This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

glibc 2.1.1pre2 breaks libstdc++-v3 build


glibc 2.1.1pre2 breaks building libstdc++-v3.  <bits/stdio.h> includes a
macro printf, ostensibly for optimization.

(a) Is this really a good idea, or should such changes printf -> fprintf
not rather be achieved by extracting "stdout" somehow (as discussed on the
gcc lists from time to time) in GCC?

(b) libstdc++-v3 should be undefining the macro printf.

* Since version 2.97 GCC knows about `fprintf' and can optimize certain
   cases.  Help gcc to optimize more code by mapping `printf' to the known
   `fprintf' function.  Unfortunately we have to use a macro.  */
# if __GNUC_PREREQ (2,97)
#  define printf(fmt, args...) fprintf (stdout, fmt, ##args)
# endif

/home/jsm28/src/gcc-build/gcc/g++ -B/home/jsm28/src/gcc-build/gcc/ -nostdinc++ -L/home/jsm28/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/src -L/home/jsm28/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/opt/gcc/snapshot/i686-pc-linux-gnu/bin/ -B/opt/gcc/snapshot/i686-pc-linux-gnu/lib/ -isystem /opt/gcc/snapshot/i686-pc-linux-gnu/include -nostdinc++ -I../../../../gcc-cvs/libstdc++-v3/include -I../../../../gcc-cvs/libstdc++-v3/include/std -I../../../../gcc-cvs/libstdc++-v3/include/c_std -I../include -I../../../../gcc-cvs/libstdc++-v3/libsupc++ -I../libio -I../../../../gcc-cvs/libstdc++-v3/libio -I../../../../gcc-cvs/libstdc++-v3/libmath -g -O2 -fvtable-thunks -D_GNU_SOURCE -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -c ../../../../gcc-cvs/libstdc++-v3/src/complex_io.cc -o complex_io.o
In file included from ../../../../gcc-cvs/libstdc++-v3/include/c_std/bits/std_cwchar.h:41,
                 from ../../../../gcc-cvs/libstdc++-v3/include/bits/std_iosfwd.h:38,
                 from ../../../../gcc-cvs/libstdc++-v3/include/bits/std_complex.h:42,
                 from ../../../../gcc-cvs/libstdc++-v3/src/complex_io.cc:30:
../../../../gcc-cvs/libstdc++-v3/include/c_std/bits/std_cstdio.h:73: parse
   error before `char'
../../../../gcc-cvs/libstdc++-v3/include/c_std/bits/std_cstdio.h:73: declaration
   of C function `int std::fprintf(...)' conflicts with
../../../../gcc-cvs/libstdc++-v3/include/c_std/bits/std_cstdio.h:71: previous
   declaration `int std::fprintf(FILE*, const char*, ...)' here
make[4]: *** [complex_io.lo] Error 1
make[4]: Leaving directory `/home/jsm28/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/jsm28/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[2]: *** [all-recursive-am] Error 2
make[2]: Leaving directory `/home/jsm28/src/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/home/jsm28/src/gcc-build'
make: *** [bootstrap] Error 2

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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