From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21104 invoked by alias); 29 Aug 2012 17:43:24 -0000 Received: (qmail 21096 invoked by uid 22791); 29 Aug 2012 17:43:23 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Aug 2012 17:43:09 +0000 From: "ldv at altlinux dot org" To: glibc-bugs@sources.redhat.com Subject: [Bug libc/14530] New: __extern_always_inline is not always defined but stdlib.h may use it nevertheless Date: Wed, 29 Aug 2012 17:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: glibc_2.16 X-Bugzilla-Severity: normal X-Bugzilla-Who: ldv at altlinux dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00202.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14530 Bug #: 14530 Summary: __extern_always_inline is not always defined but stdlib.h may use it nevertheless Product: glibc Version: unspecified Status: NEW Keywords: glibc_2.16 Severity: normal Priority: P2 Component: libc AssignedTo: unassigned@sourceware.org ReportedBy: ldv@altlinux.org CC: drepper.fsp@gmail.com, polacek@redhat.com Classification: Unclassified Commit glibc-2.15-685-g5ac3ea1 introduced a regression: $ echo '#include ' |gcc-4.1 -O2 -D_FORTIFY_SOURCE=2 -S -xc++ - -o/dev/null /usr/include/bits/stdlib.h:36: error: expected constructor, destructor, or type conversion before 'char' /usr/include/stdlib.h:972: error: expected `}' at end of input $ echo '#include ' |gcc-4.1 -O2 -D_FORTIFY_SOURCE=2 -E -xc++ - |grep -A1 __extern_always_inline |head -2 __extern_always_inline __attribute__ ((__warn_unused_result__)) char * realpath (const char *__restrict __name, char *__restrict __resolved) throw () That is, g++ < 4.3 in fortify mode no longer compiles stdlib.h. The bug is somewhat similar to http://sourceware.org/bugzill/show_bug.cgi?id=13741 but is not exactly the same. There is one particular hunk of commit glibc-2.15-685-g5ac3ea1 that made the difference: -#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline +#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function Before that change, there were no attempts to include bits/stdlib.h in case of using old g++ in fortify mode, but there were another chances to hit undefined __extern_always_inline (the last is the subject of #13741). A proper definition of __extern_always_inline in sys/cdefs.h would fix both bugs. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.