Bug 12666 - fixincludes problem on IRIX 6.5.19m
Summary: fixincludes problem on IRIX 6.5.19m
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.3.2
: P2 normal
Target Milestone: 3.3.3
Assignee: Rainer Orth
URL:
Keywords:
: 12677 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-17 20:26 UTC by The Written Word
Modified: 2003-11-03 21:09 UTC (History)
3 users (show)

See Also:
Host: mips-sgi-irix6.5
Target: mips-sgi-irix6.5
Build: mips-sgi-irix6.5
Known to work:
Known to fail:
Last reconfirmed: 2003-10-29 21:00:15


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description The Written Word 2003-10-17 20:26:53 UTC
Ran into problems building 3.3.2 on IRIX 6.5.19m:

/opt/build/gcc-3.3.2-objdir/gcc/xgcc
-B/opt/build/gcc-3.3.2-objdir/gcc/
-B/opt/TWWfsw/gcc332/mips-sgi-irix6.5/bin/
-B/opt/TWWfsw/gcc332/mips-sgi-irix6.5/lib/ -isystem
/opt/TWWfsw/gcc332/mips-sgi-irix6.5/include -c -DSkip_f2c_Undefs
-DAllow_TYQUAD -I. -I/opt/build/gcc-3.3.2/libf2c/libI77 -I..
-I/opt/build/gcc-3.3.2/libf2c/libI77/.. -DHAVE_CONFIG_H -W -Wall -O2
-g /opt/build/gcc-3.3.2/libf2c/libI77/backspace.c   -DPIC -o
.libs/backspace.o
In file included from
/opt/build/gcc-3.3.2-objdir/gcc/include/stdio.h:18,
                 from /opt/build/gcc-3.3.2/libf2c/libI77/fio.h:2,
                 from
/opt/build/gcc-3.3.2/libf2c/libI77/backspace.c:4:
/opt/build/gcc-3.3.2-objdir/gcc/include/internal/stdio_core.h: In
function `snprintf':
/opt/build/gcc-3.3.2-objdir/gcc/include/internal/stdio_core.h:310:
error: `va_list' undeclared (first use in this function)
/opt/build/gcc-3.3.2-objdir/gcc/include/internal/stdio_core.h:310:
error: (Each undeclared identifier is reported only once
/opt/build/gcc-3.3.2-objdir/gcc/include/internal/stdio_core.h:310:
error: for each function it appears in.)
/opt/build/gcc-3.3.2-objdir/gcc/include/internal/stdio_core.h:310:
error: parse error before "_ap"
/opt/build/gcc-3.3.2-objdir/gcc/include/internal/stdio_core.h:313:
error: `_ap' undeclared (first use in this function)

The problem is that in
/opt/build/gcc-3.3.2-objdir/gcc/include/internal/stdio_core.h we have:
  static int
  snprintf(char *_string, size_t _cnt, const char *_format, ...)
  {
          va_list _ap;

I looked at inclhack.def from 3.3.2 and see this:
  fix = {
      hackname = stdio_va_list;
      files    = stdio.h;
      files    = internal/stdio_core.h;
      files    = internal/wchar_core.h;
      bypass   = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list';
      ...
      sed = "s@ va_list @ __gnuc_va_list @\n"
            "s@ va_list)@ __gnuc_va_list)@\n"
            "s@(va_list)&@(__gnuc_va_list)\\&@\n"
            "s@ _VA_LIST_));@ __gnuc_va_list));@\n"
            "s@ __VA_LIST__));@ __gnuc_va_list));@\n"
            ...

However, in GCC 3.3.1, inclhack.def looks like this:
  fix = {
      hackname = stdio_va_list;
      files    = stdio.h;
      files    = internal/stdio_core.h;
      files    = internal/wchar_core.h;
      bypass   = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list';
      ...
      sed = "s@ va_list @ __gnuc_va_list @\n"
            "s@ va_list)@ __gnuc_va_list)@\n"
            "s@va_list _ap;@__gnuc_va_list _ap;@\n"
            "s@(va_list)&@(__gnuc_va_list)\\&@\n"
            "s@ _VA_LIST_));@ __gnuc_va_list));@\n"
            "s@ __VA_LIST__));@ __gnuc_va_list));@\n"

The only difference is that in 3.3.2, the following line was removed:
            "s@va_list _ap;@__gnuc_va_list _ap;@\n"
Comment 1 Andrew Pinski 2003-10-17 21:15:38 UTC
6.5.21 produces different results, see <http://gcc.gnu.org/ml/gcc-patches/2003-10/
msg00411.html>.
Comment 2 The Written Word 2003-10-17 21:18:10 UTC
Rainer Orth emailed me about that. I've emailed him the commit that
caused the problem and he said he'd look into it next week.
Comment 3 Andrew Pinski 2003-10-19 02:26:24 UTC
*** Bug 12677 has been marked as a duplicate of this bug. ***
Comment 4 Rainer Orth 2003-10-29 21:12:16 UTC
Subject: Re:  fixincludes problem on IRIX 6.5.19m

Sorry this took so long.  Proposed patch submitted:

	http://gcc.gnu.org/ml/gcc-patches/2003-10/msg02580.html

Please test.

Thanks.
	Rainer
Comment 5 CVS Commits 2003-11-03 21:04:45 UTC
Subject: Bug 12666

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	ro@gcc.gnu.org	2003-11-03 21:04:39

Modified files:
	gcc            : ChangeLog 
	gcc/fixinc     : inclhack.def fixincl.x 

Log message:
	* fixinc/inclhack.def (stdio_va_list): Allow tab before va_list.
	Merge two substitutions.
	* fixinc/fixincl.x: Regenerate.
	Fixes PR bootstrap/12666.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.792&r2=1.16114.2.793
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/inclhack.def.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.139.4.14&r2=1.139.4.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/fixincl.x.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.132.4.13&r2=1.132.4.14

Comment 6 CVS Commits 2003-11-03 21:07:41 UTC
Subject: Bug 12666

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	ro@gcc.gnu.org	2003-11-03 21:07:35

Modified files:
	gcc            : ChangeLog 
	gcc/fixinc     : inclhack.def fixincl.x 

Log message:
	* fixinc/inclhack.def (stdio_va_list): Allow tab before va_list.
	Merge two substitutions.
	* fixinc/fixincl.x: Regenerate.
	Fixes PR bootstrap/12666.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.1660&r2=2.1661
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/inclhack.def.diff?cvsroot=gcc&r1=1.186&r2=1.187
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/fixincl.x.diff?cvsroot=gcc&r1=1.174&r2=1.175

Comment 7 Rainer Orth 2003-11-03 21:09:15 UTC
Fixed for 3.3.3, 3.4:

  http://gcc.gnu.org/ml/gcc-patches/2003-10/msg02732.html