PCC bug; probably an old one

Brian case bcase at amdcad.UUCP
Thu Feb 6 09:40:03 AEST 1986


I am in the process of porting the portable C compiler.  I just found
what I think to be a bug (well, I am sure it is a bug) in the front
end.  It seems that the PCC front end generates incorrect code for
a switch statement whose expression is of type double or float (and
possibly other types; haven't checked 'em out).  In K&R, it is stated
that the type of a switch expression must be int.  So, the PCC front
end should flag an error (but doesn't).  Is this really a bug or have
I missed something?  Sorry if I am bringing up an old topic.  Reply
by mail unless general net interest is suspected.

    Brian Case
    ..ihnp4!amdcad!bcase



More information about the Comp.lang.c mailing list