PCC compiler question

tektronix!tekmdp!bronze!patc tektronix!tekmdp!bronze!patc
Tue Mar 15 07:01:10 AEST 1983


	I have come across a funny in the PCC compiler that I would
like to know about. A statement was mis-coded as:

		a && b *= c ;

No error message was given. The code that was produced showed that
the compiler compiled the statement as:

		if ( a ) b *= c ;

I thought the && operator had a higher precedence than assignment
and the result should have been equivalent to:

		( a && b ) *= c ;

If I code the statement with explicit parens then I get the error
message "lvalue required" which is what I expected. Anybody have any
idea why this is like this and is this the way it's suppose to work
or is it a bug? Reply by mail to 
 	[cbsog,decvax,ihnss,puree,ucbvax]!teklabs!tekmdp!patc
	[ucbcad,iddic]!tektronix!patc
	patc at tektronix			CSNET
Thanks.



More information about the Comp.lang.c mailing list