This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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 c++/11201] New: g++ -pedantic -O fails compile #include <cstdio>


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]