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

egcs, cp/lex.c warning confusion ...


	In egcs/cp/lex.c a warning is elicited for the following line 2990:


 >       if (parsing && yychar == '(' || yychar == LEFT_RIGHT)

 > lex.c: In function `do_scoped_id':
 > lex.c:2990: warning: suggest parentheses around && within ||


I'm wondering what the proper way to parenthesize this expression is.
Preserving the current behavior would mean doing this:

 >       if ((parsing && yychar == '(') || yychar == LEFT_RIGHT)


	However I happened to notice on line 2860 that a similar
comparison explicitly uses a different order of precedence.

 >       else if (parsing && (yychar == '(' || yychar == LEFT_RIGHT))

	Obviously, they may not be related.  Would someone who is
familiar with the code please explain a proper solution?

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.


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