This is the mail archive of the gcc-prs@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]

c++/112: Re: typeid() problems (Internal compiler error 252 / Assembler errors)



>Number:         112
>Category:       c++
>Synopsis:       typeid() problems (Assembler errors)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          analyzed
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 15 01:16:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Stefan Kirchberg <sk@gluit.de>
>Release:        2.95.2
>Organization:
>Environment:
>Description:
 Original-Message-Id: <199908180853.KAA07892@moon.gluit.de>
 Reply-To: sk@gluit.de
 Date: Wed, 18 Aug 1999 10:53:35 +0200


 Hi,

 I encountered problems when compiling the following piece of C++ source
 (I shortened it down to a few lines, converting 'real' statements to
 simple function calls of typeid()).

 My system:	Linux/GNU, kernel 2.2.10
		 gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
		 (i.e. standard installation of SuSE Linux 6.2, released
		 a few days ago)

 The first error occurs when compiling with -DERR1 (using a typedef);
 [MvL - this bug has been fixed in 2.95, and the code is removed from
 this PR]

 The second one occurs with -DERR2 (i.e. using a variable array size); the
 call to typeid() in the last two lines of main() is where it happens
 (either line triggers the error messages):

 x.s: Assembler messages:
 x.s:53: Error: Ignoring junk 'Wpl1Wc' after expression
 x.s:68: Error: Ignoring junk 'Wpl1Wc' after expression
 x.s:83: Error: Expected comma after symbol-name
 x.s:83: Error: Rest of line ignored. First ignored character is `*'.
 x.s:89: Error: Rest of line ignored. First ignored character is `*'.
 x.s:90: Error: ignoring unrecognized symbol type ""
 x.s:90: Error: Rest of line ignored. First ignored character is `*'.
 x.s:91: Error: invalid character '_' in opcode
 x.s:97: Error: Ignoring junk 'Wpl1Wc' after expression
 x.s:100: Warning: warning: unrecognized characters `Wpl1Wc' in expression
 x.s:105: Warning: warning: unrecognized characters `Wpl1Wc' in expression
 x.s:114: Error: expected comma after name `__tfAEE' in .size directive
 x.s:114: Error: Rest of line ignored. First ignored character is `*'.
 x.s:115: Error: Expected comma after symbol-name
 x.s:115: Error: Rest of line ignored. First ignored character is `*'.
 x.s:121: Error: Rest of line ignored. First ignored character is `*'.
 x.s:122: Error: ignoring unrecognized symbol type ""
 x.s:122: Error: Rest of line ignored. First ignored character is `*'.
 x.s:123: Error: invalid character '_' in opcode
 x.s:129: Error: Ignoring junk 'Wpl1Wc' after expression
 x.s:132: Warning: warning: unrecognized characters `Wpl1Wc' in expression
 x.s:137: Warning: warning: unrecognized characters `Wpl1Wc' in expression
 x.s:146: Error: expected comma after name `__tfAEE' in .size directive
 x.s:146: Error: Rest of line ignored. First ignored character is `*'.

 When compiling the alternative version (without ERR1/ERR2 being defined)
 no errors occur. When compiling with an older g++
	 Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2.1/specs
	 gcc version 2.7.2.1
 no errors occur either (with -DERR1 / -DERR2, of course).

 Below the signature you find a uuencoded .tgz archive of all relevant
 files.
 [MvL - only source for ERR2 included]
>How-To-Repeat:
#include <typeinfo>


#define	CHARTYPE	char
void main ()
{
	typeid(CHARTYPE*);

	int	len		= 1;
	char	carr[len];
	typeid(typeof(carr));
	typeid(carr);
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:

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