This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: C++ standards question
- From: Jay <jay dot krell at cornell dot edu>
- To: "Mailaripillai, Kannan Jeganathan" <kannanmj at hp dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, John Fine <johnsfine at verizon dot net>, gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 4 Feb 2013 20:54:05 -0800
- Subject: Re: C++ standards question
- References: <AA6ADB5A789EDD4DA355F183E8ECDFA67525754F@G4W3213.americas.hpqcorp.net>
This sounds like a bug. But I am skeptical that any compiler has this bug. Do you have a small test case that demonstrates it? Compilers aren't bug-free (nothing is) but there are FAR more bugs in compiler input than compilers themselves.
- Jay
On Feb 3, 2013, at 9:34 PM, "Mailaripillai, Kannan Jeganathan" <kannanmj@hp.com> wrote:
>> if ( expression of *p ) *p = '-';
>>
>> The optimizer changes that to the equivalent of
>>
>> *p = (expression of *p ) ? '-' : *p;
>>
>> Is that a valid optimization?