Bug 16193 - [4.0 Regression] Bootstrap failure in libstdc++-v3
Summary: [4.0 Regression] Bootstrap failure in libstdc++-v3
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.0
: P2 critical
Target Milestone: 4.0.0
Assignee: Mark Mitchell
URL:
Keywords: build, rejects-valid
Depends on:
Blocks:
 
Reported: 2004-06-25 08:55 UTC by Eric Botcazou
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: sparc-sun-solaris2.8
Target: sparc-sun-solaris2.8
Build: sparc-sun-solaris2.8
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Botcazou 2004-06-25 08:55:33 UTC
I get:

In file included from /usr/include/locale.h:51,
                 from
/opt/build/eric/gcc/sparc-sun-solaris2.8/libstdc++-v3/include/clocale:49,
                 from /home/eric/cvs/gcc/libstdc++-v3/include/stdc++.h:39:
/usr/include/libintl.h:24: error: declaration does not declare anything
In file included from /usr/include/locale.h:51,
                 from
/opt/build/eric/gcc/sparc-sun-solaris2.8/libstdc++-v3/include/clocale:49,
                 from /home/eric/cvs/gcc/libstdc++-v3/include/stdc++.h:39:
/usr/include/libintl.h:24: error: declaration does not declare anything
gmake[4]: *** [sparc-sun-solaris2.8/bits/stdc++.h] Error 1


Excerpt from /usr/include/libintl.h:

22:#define TEXTDOMAINMAX   256
23:
24:#ifdef __STDC__
25:extern char *dcgettext(const char *, const char *, const int);

which suggests that something is miscompiled in 32-bit mode (the 64-bit version
of the library builds fine).

poog% cat ~/cvs/gcc/LAST_UPDATED
Fri Jun 25 00:30:38 CDT 2004
Fri Jun 25 05:30:38 UTC 2004

The last successful bootstrap was on 06/21.
Comment 1 Andrew Pinski 2004-06-25 23:53:10 UTC
Was the last bootstrap before or after Kenner's bug patch.
Comment 2 Eric Botcazou 2004-06-26 10:06:52 UTC
> Was the last bootstrap before or after Kenner's bug patch.

Not sure what is "Kenner's bug patch", but the last successful bootstrap was
before his 2004-06-21 patch.
Comment 3 Andrew Pinski 2004-06-26 19:17:26 UTC
That should have been big and not bug, I was tried before writting the message and u and i are right 
next to one another on the keyboard.
Comment 4 Eric Botcazou 2004-06-27 09:37:49 UTC
Present on all sparc-sun-solaris2.* targets as of:

gax% cat ~/cvs/gcc/LAST_UPDATED
Sun Jun 27 01:00:58 CDT 2004
Sun Jun 27 06:00:58 UTC 2004
Comment 5 Eric Botcazou 2004-06-27 15:13:22 UTC
I was wrong, line #24 is

#ifndef _WCHAR_T
#define _WCHAR_T
#if defined(_LP64)
typedef int     wchar_t;
#else
typedef long    wchar_t;  <-- line #24
#endif
#endif  /* !_WCHAR_T */

so what happens is that the C++ front-end fails to recognize that the line is a
redeclaration of C++ built-in type.
Comment 6 Andrew Pinski 2004-06-27 17:36:00 UTC
I short example would be:
typedef long wchar_t;
wchar_t t;

Then this might be caused by one of Mark's patches to speed up the C++ compiler.
Comment 7 Mark Mitchell 2004-06-27 18:40:13 UTC
Almost certainly caused by my patches; will fix ASAP.
Comment 8 GCC Commits 2004-06-27 18:56:49 UTC
Subject: Bug 16193

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-06-27 18:56:46

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/cp         : ChangeLog parser.c 
Added files:
	gcc/testsuite/g++.dg/parse: redef1.C 

Log message:
	PR c++/16193
	* parser.c (cp_parser_set_decl_spec_type): Refine test for
	redefinition of built-in types.
	
	PR c++/16193
	* g++.dg/parse/redef1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3903&r2=1.3904
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/redef1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4134&r2=1.4135
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.218&r2=1.219

Comment 9 Mark Mitchell 2004-06-27 18:58:27 UTC
Fixed in GCC 3.5.0.