[PATCH] Fix for short-enums comparison bug

Jeffrey A Law law@hurl.cygnus.com
Sun Feb 28 18:15:00 GMT 1999


  In message < x490ee6l2e.fsf@janus.pgt.com >you write:
  > VARIATION 2:
  > 
  > ChangeLog entry:
  > Thu Feb  4 14:02:17 EST 1999  Charles G Waldman  <cgw@alum.mit.edu>
  > 
  > 	* c-common.c (shorten_compare): When comparing enumerated
  > 	types, compute minval and maxval from the enums precision,
  > 	rather than the enum itself.  This fixes problems comparing
  > 	enums when -fshort-enums is on.
I installed this change (with some updated comments) into both the mainline
sources and on the egcs-1.1.2 branch.

Thanks,
jeff



More information about the Gcc-patches mailing list