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

Re: How to fix this bug?


At 9:27 PM +0400 5/25/00, A.M.Raportirenko wrote:
>int
>foo ()
>{
>   int xor = 1;
>
>   return xor;
>}
>
>unix8# gcc -c ttt.cxx
>ttt.cxx: In function `int foo ()':
>ttt.cxx:4: parse error before `^'
>
>unix8# gcc -v
>Reading specs from /usr/local/bin/../lib/gcc-lib/i386-pc-linux-gnu/2.96/specs
>gcc version 2.96 20000525 (experimental)


	'xor' is a reserved word in C++.  It's a user error.

	And the error message gives you a subtle clue by
	complaining about parse error before '^'.

	-- Al Lehotsky
-- 
------------------------------------------------------------------------

		    Quality Software Management
		http://www.tiac.net/users/lehotsky
			lehotsky@tiac.net
			(978)287-0435 Voice
			(978)808-6836 Cellular
			(978)287-0436 Fax/Data

	Software Process Improvement and Management Consulting
	     Language Design and Compiler Implementation

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