public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11201] New: g++ -pedantic -O fails compile #include <cstdio>
@ 2003-06-16  0:42 takumi@asaki.jp
  2003-06-16  0:57 ` [Bug c++/11201] " pinskia@physics.uc.edu
  2003-06-16  1:59 ` takumi@asaki.jp
  0 siblings, 2 replies; 3+ messages in thread
From: takumi@asaki.jp @ 2003-06-16  0:42 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11201

           Summary: g++ -pedantic -O fails compile #include <cstdio>
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: takumi@asaki.jp
                CC: gcc-bugs@gcc.gnu.org

g++ fails to compile source includes <cstdio> when set pedantic and O option. 
 
% cat a.cpp 
#include <cstdio> 
int main() 
{ return 0; } 
 
[OK]% g++ a.cpp 
[OK]% g++ -pedantic a.cpp 
[OK]% g++ -O a.cpp 
[NG]% g++ -pedantic -O a.cpp 
In file included from /usr/include/stdio.h:827, 
                 from /usr/include/c++/3.2.3/cstdio:52, 
                 from a.cpp:1: 
/usr/include/bits/stdio.h: In function `int getchar()': 
/usr/include/bits/stdio.h:42: declaration of `int getchar() throw ()' throws  
   different exceptions 
/usr/include/stdio.h:444: than previous declaration `int getchar()' 
/usr/include/bits/stdio.h: In function `int getc_unlocked(FILE*)': 
/usr/include/bits/stdio.h:51: declaration of `int getc_unlocked(FILE*) throw 
() 
   ' throws different exceptions 
/usr/include/stdio.h:456: than previous declaration `int getc_unlocked(FILE*)' 
/usr/include/bits/stdio.h: In function `int getchar_unlocked()': 
/usr/include/bits/stdio.h:58: declaration of `int getchar_unlocked() throw ()'  
   throws different exceptions 
/usr/include/stdio.h:457: than previous declaration `int getchar_unlocked()' 
/usr/include/bits/stdio.h: In function `int putchar(int)': 
/usr/include/bits/stdio.h:67: declaration of `int putchar(int) throw ()' 
throws  
   different exceptions 
/usr/include/stdio.h:483: than previous declaration `int putchar(int)' 
/usr/include/bits/stdio.h: In function `int fputc_unlocked(int, FILE*)': 
/usr/include/bits/stdio.h:76: declaration of `int fputc_unlocked(int, FILE*)  
   throw ()' throws different exceptions 
/usr/include/stdio.h:497: than previous declaration `int fputc_unlocked(int,  
   FILE*)' 
/usr/include/bits/stdio.h: In function `int putc_unlocked(int, FILE*)': 
/usr/include/bits/stdio.h:86: declaration of `int putc_unlocked(int, FILE*)  
   throw ()' throws different exceptions 
/usr/include/stdio.h:505: than previous declaration `int putc_unlocked(int,  
   FILE*)' 
/usr/include/bits/stdio.h: In function `int putchar_unlocked(int)': 
/usr/include/bits/stdio.h:93: declaration of `int putchar_unlocked(int) throw  
   ()' throws different exceptions 
/usr/include/stdio.h:506: than previous declaration `int 
putchar_unlocked(int)' 
/usr/include/bits/stdio.h: In function `__ssize_t getline(char**, size_t*,  
   FILE*)': 
/usr/include/bits/stdio.h:103: declaration of `__ssize_t getline(char**,  
   size_t*, FILE*) throw ()' throws different exceptions 
/usr/include/stdio.h:573: than previous declaration `__ssize_t getline(char**,  
   size_t*, FILE*)' 
 
% rpm -q gcc 
gcc-3.2.3-0vl2 
 
% gcc -v 
Reading specs from /usr/lib/gcc-lib/i386-vine-linux/3.2.3/specs 
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix 
--disable-checking --with-system-zlib --enable-__cxa_atexit 
--host=i386-vine-linux 
Thread model: posix 
gcc version 3.2.3


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

* [Bug c++/11201] g++ -pedantic -O fails compile #include <cstdio>
  2003-06-16  0:42 [Bug c++/11201] New: g++ -pedantic -O fails compile #include <cstdio> takumi@asaki.jp
@ 2003-06-16  0:57 ` pinskia@physics.uc.edu
  2003-06-16  1:59 ` takumi@asaki.jp
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia@physics.uc.edu @ 2003-06-16  0:57 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11201


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


------- Additional Comments From pinskia@physics.uc.edu  2003-06-16 00:57 -------
This is not a gcc bug because it does not provide the headers for stdio.h, that means this is glibc 
bug, also I do not see the bug on glibc 2.2.5 or glibc 2.3.1 with gcc 3.2.3 or the mainline 
(20030615).


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

* [Bug c++/11201] g++ -pedantic -O fails compile #include <cstdio>
  2003-06-16  0:42 [Bug c++/11201] New: g++ -pedantic -O fails compile #include <cstdio> takumi@asaki.jp
  2003-06-16  0:57 ` [Bug c++/11201] " pinskia@physics.uc.edu
@ 2003-06-16  1:59 ` takumi@asaki.jp
  1 sibling, 0 replies; 3+ messages in thread
From: takumi@asaki.jp @ 2003-06-16  1:59 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11201



------- Additional Comments From takumi@asaki.jp  2003-06-16 01:59 -------
Thanks. 
My glibc is 2.3.2. 
I'll check glibc. 
 
% rpm -q glibc 
glibc-2.3.2-37vl2


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

end of thread, other threads:[~2003-06-16  1:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-16  0:42 [Bug c++/11201] New: g++ -pedantic -O fails compile #include <cstdio> takumi@asaki.jp
2003-06-16  0:57 ` [Bug c++/11201] " pinskia@physics.uc.edu
2003-06-16  1:59 ` takumi@asaki.jp

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).