This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
[SOLVED] Re: wrong code generated in gcc-4.1.1?
- From: Hiroki Kaminaga <kaminaga at sm dot sony dot co dot jp>
- To: gcc-help at gcc dot gnu dot org
- Cc: kaminaga at sm dot sony dot co dot jp
- Date: Tue, 04 Dec 2007 14:41:25 +0900 (JST)
- Subject: [SOLVED] Re: wrong code generated in gcc-4.1.1?
- References: <20071204.125550.92589803.kaminaga@sm.sony.co.jp>
Hi,
> Below sample program produced wrong code in g++ version 4.1.1.
> Is this a bug or am I violating C++ standard?
> (not taking range propagation into account?)
It was due to my lack of knowledge, "Programming Language C++ 3rd ed."
said assignment to enum which is out of range is undefined,
(or something like that in Japanese...), so it is not g++ generating
wrong code. Sorry for noice.
Best Regards,
(Hiroki Kaminaga)
t
--