public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/34697] New: gcc -std=gnu99 emits global symbol for extern inline function declarations
@ 2008-01-07 0:20 dan at math dot uiuc dot edu
2008-01-07 0:22 ` [Bug c/34697] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dan at math dot uiuc dot edu @ 2008-01-07 0:20 UTC (permalink / raw)
To: gcc-bugs
Here's the source code:
extern inline void f() {}
int main () {}
Compile with
gcc -c -std=gnu99 filename.c
Use nm filename.o to see that a global symbol f has been declared, but it
shouldn't be.
This prevents libgmp from being usable under Mac OS 10.5.
% uname -a
Darwin indigo.local 9.1.0 Darwin Kernel Version 9.1.0: Wed Oct 31 17:46:22 PDT
2007; root:xnu-1228.0.2~1/RELEASE_I386 i386
--
Summary: gcc -std=gnu99 emits global symbol for extern inline
function declarations
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dan at math dot uiuc dot edu
GCC build triplet: i686-apple-darwin9
GCC host triplet: i686-apple-darwin9
GCC target triplet: i686-apple-darwin9
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34697
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/34697] gcc -std=gnu99 emits global symbol for extern inline function declarations
2008-01-07 0:20 [Bug c/34697] New: gcc -std=gnu99 emits global symbol for extern inline function declarations dan at math dot uiuc dot edu
@ 2008-01-07 0:22 ` pinskia at gcc dot gnu dot org
2008-01-07 1:16 ` dan at math dot uiuc dot edu
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-07 0:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-01-06 23:25 -------
Well extern inline for 4.3.0 and before in C99 mode was the GNU 89 extern
inline and not the C99 extern inline. This was fixed for 4.3.0.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34697
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/34697] gcc -std=gnu99 emits global symbol for extern inline function declarations
2008-01-07 0:20 [Bug c/34697] New: gcc -std=gnu99 emits global symbol for extern inline function declarations dan at math dot uiuc dot edu
2008-01-07 0:22 ` [Bug c/34697] " pinskia at gcc dot gnu dot org
@ 2008-01-07 1:16 ` dan at math dot uiuc dot edu
2008-01-07 1:30 ` dan at math dot uiuc dot edu
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dan at math dot uiuc dot edu @ 2008-01-07 1:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dan at math dot uiuc dot edu 2008-01-07 00:20 -------
Well, if you were right, then gnu99 and gnu89 would have the same behavior, but
they don't:
indigo% gcc -c -std=gnu99 foo.c
indigo% nm foo.o
00000000 T _f
00000008 T _main
indigo% gcc -c -std=gnu89 foo.c
indigo% nm foo.o
00000000 T _main
indigo% gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking
-enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --with-arch=apple --with-tune=generic
--host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)
--
dan at math dot uiuc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34697
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/34697] gcc -std=gnu99 emits global symbol for extern inline function declarations
2008-01-07 0:20 [Bug c/34697] New: gcc -std=gnu99 emits global symbol for extern inline function declarations dan at math dot uiuc dot edu
2008-01-07 0:22 ` [Bug c/34697] " pinskia at gcc dot gnu dot org
2008-01-07 1:16 ` dan at math dot uiuc dot edu
@ 2008-01-07 1:30 ` dan at math dot uiuc dot edu
2008-01-07 1:32 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dan at math dot uiuc dot edu @ 2008-01-07 1:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dan at math dot uiuc dot edu 2008-01-07 00:21 -------
PS: it could be a bug inserted by Apple...
--
dan at math dot uiuc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dan at math dot uiuc dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34697
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/34697] gcc -std=gnu99 emits global symbol for extern inline function declarations
2008-01-07 0:20 [Bug c/34697] New: gcc -std=gnu99 emits global symbol for extern inline function declarations dan at math dot uiuc dot edu
` (2 preceding siblings ...)
2008-01-07 1:30 ` dan at math dot uiuc dot edu
@ 2008-01-07 1:32 ` pinskia at gcc dot gnu dot org
2008-01-07 3:48 ` dan at math dot uiuc dot edu
2008-01-07 11:12 ` rguenth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-07 1:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2008-01-07 00:28 -------
> Use nm filename.o to see that a global symbol f has been declared, but it
>shouldn't be.
Yes it should, that is what it should do for C99/GNU99.
>PS: it could be a bug inserted by Apple...
Well no, Apple just fixed extern inline for C99 mode for their 4.0.x compiler.
So GMP has issues with its source not being C99 compatible even though it uses
-std=gnu99 .
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34697
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/34697] gcc -std=gnu99 emits global symbol for extern inline function declarations
2008-01-07 0:20 [Bug c/34697] New: gcc -std=gnu99 emits global symbol for extern inline function declarations dan at math dot uiuc dot edu
` (3 preceding siblings ...)
2008-01-07 1:32 ` pinskia at gcc dot gnu dot org
@ 2008-01-07 3:48 ` dan at math dot uiuc dot edu
2008-01-07 11:12 ` rguenth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: dan at math dot uiuc dot edu @ 2008-01-07 3:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dan at math dot uiuc dot edu 2008-01-07 01:43 -------
Thank you!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34697
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/34697] gcc -std=gnu99 emits global symbol for extern inline function declarations
2008-01-07 0:20 [Bug c/34697] New: gcc -std=gnu99 emits global symbol for extern inline function declarations dan at math dot uiuc dot edu
` (4 preceding siblings ...)
2008-01-07 3:48 ` dan at math dot uiuc dot edu
@ 2008-01-07 11:12 ` rguenth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-07 11:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2008-01-07 10:04 -------
Update your gmp, this was fixed in 4.2.2.
> Well, if you were right, then gnu99 and gnu89 would have the same behavior, but
> they don't:
gnu99 behaves like c99.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34697
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-01-07 10:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-07 0:20 [Bug c/34697] New: gcc -std=gnu99 emits global symbol for extern inline function declarations dan at math dot uiuc dot edu
2008-01-07 0:22 ` [Bug c/34697] " pinskia at gcc dot gnu dot org
2008-01-07 1:16 ` dan at math dot uiuc dot edu
2008-01-07 1:30 ` dan at math dot uiuc dot edu
2008-01-07 1:32 ` pinskia at gcc dot gnu dot org
2008-01-07 3:48 ` dan at math dot uiuc dot edu
2008-01-07 11:12 ` rguenth at gcc dot gnu dot org
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).