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/17631] New: Implementation of __CORRECT_ISO_CPP_STRING_H_PROTO relies on GCC extensions


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

            Bug ID: 17631
           Summary: Implementation of __CORRECT_ISO_CPP_STRING_H_PROTO
                    relies on GCC extensions
           Product: glibc
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: matz at suse dot de
                CC: drepper.fsp at gmail dot com

The implementation of the __CORRECT_ISO_CPP_STRING_H_PROTO macro in
/usr/include/string.h relies on asm aliases, which is a GCC extension.
With a change that was supposed to be for clang, discussed at 
  https://www.sourceware.org/ml/libc-alpha/2013-12/msg00478.html
the check guarding this macro was changed to:
  #if defined __cplusplus && (__cplusplus >= 199711L || __GNUC_PREREQ (4, 4))

So, effectively it's now defined for all standard conforming C++ compilers.
But some of them (Cray CCE) don't support the asm label GNU extension, except
under special options, so if those aren't used you'll get compile errors with
these later declarations:

  extern void *memchr (void *__s, int __c, size_t __n)
      __THROW __asm ("memchr") __attribute_pure__ __nonnull ((1));
  extern const void *memchr (const void *__s, int __c, size_t __n)
      __THROW __asm ("memchr") __attribute_pure__ __nonnull ((1));

I think glibc headers are supposed to work with all standard conforming
compilers, so something needs to be done about this.

-- 
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]