public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/16907] New: <argp.h> compiled with --std=cXX disables __attribute__
@ 2014-05-05 15:27 aurelien at aurel32 dot net
  2014-06-12 19:25 ` [Bug libc/16907] " fweimer at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: aurelien at aurel32 dot net @ 2014-05-05 15:27 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 16907
           Summary: <argp.h> compiled with --std=cXX disables
                    __attribute__
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: aurelien at aurel32 dot net
                CC: drepper.fsp at gmail dot com

When <argp.h> is included first and thus __attribute__ is not defined, with
-std=c90, c99 or c11, the __attribute__ is redefined as empty due to the
following code:

#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later.  */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
#  define __attribute__(Spec) /* empty */
# endif

This might break headers included later, for example it breaks
-D_FORTIFY_SOURCE=2 by not defining strcpy() correctly [1]. Besides some
reformating, this code is more than 10 years old, and I don't know if there is
still a reason to redefine __attribute__ that way.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=647084

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libc/16907] <argp.h> compiled with --std=cXX disables __attribute__
  2014-05-05 15:27 [Bug libc/16907] New: <argp.h> compiled with --std=cXX disables __attribute__ aurelien at aurel32 dot net
@ 2014-06-12 19:25 ` fweimer at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: fweimer at redhat dot com @ 2014-06-12 19:25 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-12 19:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-05 15:27 [Bug libc/16907] New: <argp.h> compiled with --std=cXX disables __attribute__ aurelien at aurel32 dot net
2014-06-12 19:25 ` [Bug libc/16907] " fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).