egcs-980129, fixed ambiguous `else' warnings in the gcc/f/ dir.

Andreas Schwab schwab@issan.informatik.uni-dortmund.de
Fri Feb 13 02:28:00 GMT 1998


Richard Henderson <rth@cygnus.com> writes:

|> On Thu, Feb 12, 1998 at 01:30:19PM -0500, Kaveh R. Ghazi wrote:
|>> 	Is it a bug or a feature?  Ie, is it good coding style to not
|>> use braces even if the if-then-else tree is full?

|> Coding style aside, the warning tells you that it is ambiguous when
|> it is not.  If the tree is full, there is exactly one way it can be
|> parsed.  Thus, a bug, IMO.

Given the rules for resolving ambiguous else there is _always_ exactly one
way this can be parsed, even if it is not a full if-then-else tree.
Otherwise you would not be able to write it in the first place.  After
all, this is only a warning, and will also protect you against future
changes that may make it ambiguous again.

Andreas.



More information about the Gcc mailing list