[Bug c++/14644] enum of value zero not converted to (null) pointer

2006-03-30 Thread mmitchel at gcc dot gnu dot org
--- Comment #5 from mmitchel at gcc dot gnu dot org 2006-03-31 02:28 --- As Roger says, this not a bug. Roger's analysis is spot on. (For reference, EDG also rejects this program.) -- mmitchel at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/14644] enum of value zero not converted to (null) pointer

2006-03-28 Thread schwab at suse dot de
--- Comment #4 from schwab at suse dot de 2006-03-28 23:09 --- Ignore my last comment. The type matters, and what is needed is indeed a constant of _integer_ type, but enumerators are not of integer type. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14644

[Bug c++/14644] enum of value zero not converted to (null) pointer

2006-03-28 Thread schwab at suse dot de
--- Comment #3 from schwab at suse dot de 2006-03-28 23:01 --- But [expr.const] also says: An integral constant-expression can involve only literals (2.13), enumerators, ... Thus enumerators are also integral constant expressions. The distinction between integral and enumeration is on

[Bug c++/14644] enum of value zero not converted to (null) pointer

2006-03-28 Thread roger at eyesopen dot com
--- Comment #2 from roger at eyesopen dot com 2006-03-28 21:46 --- I believe that this may not be a g++ bug. The wording of the standard is: [conv.ptr] An null pointer constant is an *integral* constant expression (_expr.const_) rvalue of integer type that evaluates to zero. Ignoring th