This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/16459] New: endian.h does not define byte-order conversion functions


https://sourceware.org/bugzilla/show_bug.cgi?id=16459

            Bug ID: 16459
           Summary: endian.h does not define byte-order conversion
                    functions
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: jaak at ristioja dot ee
                CC: drepper.fsp at gmail dot com

"man 3 endian" says it does, but actually it doesn't. If it would, one would be
able to take the address of such a function:

  #define _BSD_SOURCE
  #include <endian.h>

  void g() {
    uint64_t (*f)(uint64_t) = &htole64;
  }

$ gcc -Wimplicit-function-declaration test2.c -c
test.c: In function 'g':
test.c:5:3: warning: implicit declaration of function 'uint64_t'
[-Wimplicit-function-declaration]
test.c:5:14: error: 'f' undeclared (first use in this function)
test.c:5:14: note: each undeclared identifier is reported only once for each
function it appears in
test.c:5:30: error: 'htole64' undeclared (first use in this function)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]