Bug 12263 - compiler error in libf2c/libI77/backspace.c
Summary: compiler error in libf2c/libI77/backspace.c
Alias: None
Product: gcc
Classification: Unclassified
Component: libf2c (show other bugs)
Version: 3.3.1
: P2 normal
Target Milestone: 3.3.2
Assignee: Rainer Orth
: 12580 (view as bug list)
Depends on:
Reported: 2003-09-12 15:34 UTC by john barry
Modified: 2003-11-26 02:48 UTC (History)
3 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2003-10-07 21:26:36


Note You need to log in before you can comment on or make changes to this bug.
Description john barry 2003-09-12 15:34:54 UTC
Output of gcc -v:
Reading specs from
Configured with: ../gcc-3.3.1.src/configure --prefix=/usr/data2/local/gcc-3.3.1
Thread model: single
gcc version 3.3.1

Compiler error generated while compiling with: gmake bootstrap:

While compiling : /libf2c/libI77/backspace.c

from file fio.h:2
from file stdio.h:18
from file internal/stdio_core.h:319

undefined type "__gnuc___gnuc_va_list"

Work around was to edit internal/stdio_core.h.
(1) #included  stdarg.h which defined : __gnuc_va_list
(2) changed line 319 from :
 	__SGI_LIBC_NAMESPACE_QUALIFIER __gnuc___gnuc_va_list _ap;
	__SGI_LIBC_NAMESPACE_QUALIFIER __gnuc_va_list _ap;

then gmake bootstrap completed successfully.
Comment 1 Andrew Pinski 2003-10-06 20:55:27 UTC
Fixed on the mainline by:
        * fixinc/inclhack.def (stdio_va_list): Removed _ap fix.
        (irix_stdio_va_list): Don't require leading printf, IRIX 6.5.21
        introduced some multi-line prototypes.
        * fixinc/fixincl.x: Regenerate.
Comment 2 Rainer Orth 2003-10-07 21:23:29 UTC
Reopen to allow fixing for 3.3.2, too.
Comment 3 Rainer Orth 2003-10-07 21:26:34 UTC
Could you please check that this patch


fixes the bug for you.  Please note that you need to regenerate
gcc/fixinc/fixincl.x for it to have effect.

I'm currently running a bootstrap of the current 3.3 branch with this fix
include.  It may be possible to get the fix into 3.3.2 if it can be confirmed
to work and is sufficiently low-risk.
Comment 4 Rainer Orth 2003-10-09 18:05:26 UTC
Fixed for 3.3.2, too:

Comment 5 Andrew Pinski 2003-10-11 16:17:32 UTC
*** Bug 12580 has been marked as a duplicate of this bug. ***
Comment 6 steven.robbins 2003-11-26 02:48:23 UTC
I have the opposite experience.

With our irix 6.5 system, gcc 3.3.1 built fine, but 3.3.2 fails to build on this

/tmp/smr/build/gcc/xgcc -B/tmp/smr/build/gcc/ -B/usr/local/mips-sgi-irix6.5/bin/
-B/usr/local/mips-sgi-irix6.5/lib/ -isystem /usr/local/mips-sgi-irix6.5/include
-c -DSkip_f2c_Undefs -DAllow_TYQUAD -I. -I../../../../gcc-3.3.2/libf2c/libI77
-I.. -I../../../../gcc-3.3.2/libf2c/libI77/.. -DHAVE_CONFIG_H -W -Wall -O2 -O
../../../../gcc-3.3.2/libf2c/libI77/backspace.c   -DPIC -o .libs/backspace.o
In file included from /tmp/smr/build/gcc/include/stdio.h:18,
                 from ../../../../gcc-3.3.2/libf2c/libI77/fio.h:2,
                 from ../../../../gcc-3.3.2/libf2c/libI77/backspace.c:4:
/tmp/smr/build/gcc/include/internal/stdio_core.h: In function `snprintf':
/tmp/smr/build/gcc/include/internal/stdio_core.h:310: error: `va_list'
undeclared (first use in this function)
/tmp/smr/build/gcc/include/internal/stdio_core.h:310: error: (Each undeclared
identifier is reported only once
/tmp/smr/build/gcc/include/internal/stdio_core.h:310: error: for each function
it appears in.)
/tmp/smr/build/gcc/include/internal/stdio_core.h:310: error: parse error before
/tmp/smr/build/gcc/include/internal/stdio_core.h:313: error: `_ap' undeclared
(first use in this function)
make[3]: *** [backspace.lo] Error 1