]> gcc.gnu.org Git - gcc.git/commit - gcc/c-decl.c
c-decl.c (finish_enum): Simplify code to determine minimum and maximum values of...
authorZack Weinberg <zack@rabi.columbia.edu>
Wed, 5 Jan 2000 19:26:23 +0000 (19:26 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Wed, 5 Jan 2000 19:26:23 +0000 (19:26 +0000)
commitcb3ca04ee18428f3c08b36f97ee0184449bcb6c6
tree2f5f1a4333cfc525d0e30c2fc974ac8bf2621783
parent28b487d7fe96ff2475bd8de4f86d9bc3da040e85
c-decl.c (finish_enum): Simplify code to determine minimum and maximum values of the enum...

2000-01-05 11:25 -0800  Zack Weinberg  <zack@rabi.columbia.edu>

* c-decl.c (finish_enum): Simplify code to determine minimum and
maximum values of the enum, and calculate the type.  Remove check
for FUNCTION_DECLs in the values list, which cannot happen.  Replace
the DECL_INITIAL of each enumeration constant with a copy converted
to the enumeration type.  When updating variant types, don't bother
updating the type itself.

* c-typeck.c (build_binary_op): Simplify conditional expressions
when weeding out spurious signed-unsigned warnings.  Add new
spurious warning category: if the unsigned quantity is an enum
and its maximum value fits in signed_type(result_type).  Update
commentary.
(build_conditional_expr): Warn here if one alternative is signed
and the other is unsigned.

From-SVN: r31244
gcc/ChangeLog
gcc/c-decl.c
gcc/c-typeck.c
gcc/testsuite/gcc.dg/compare1.c
This page took 0.058308 seconds and 5 git commands to generate.