public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* egcs, cp/lex.c warning confusion ...
@ 1998-03-02 11:25 Kaveh R. Ghazi
  0 siblings, 0 replies; only message in thread
From: Kaveh R. Ghazi @ 1998-03-02 11:25 UTC (permalink / raw)
  To: egcs

	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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-03-02 11:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-02 11:25 egcs, cp/lex.c warning confusion Kaveh R. Ghazi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).