This is the mail archive of the
mailing list for the GCC project.
Re: simple example -O3 optimizer problem?
- From: Andrew Haley <aph at redhat dot com>
- To: Dennis Luehring <dl dot soluz at gmx dot net>, gcc at gcc dot gnu dot org
- Date: Fri, 18 Jul 2014 10:14:24 +0100
- Subject: Re: simple example -O3 optimizer problem?
- Authentication-results: sourceware.org; auth=none
- References: <53C8CD0F dot 4090502 at gmx dot net> <53C8DAF6 dot 3060509 at redhat dot com> <53C8DD73 dot 1090806 at gmx dot net>
On 07/18/2014 09:40 AM, Dennis Luehring wrote:
> Am 18.07.2014 10:29, schrieb Andrew Haley:
>> On 18/07/14 08:30, Dennis Luehring wrote:
>>> int* array = (int*)&argv;
>> This looks like undefined behaviour. Don't you get a warning?
> no warning - its an valid typed pointer to stack and i don't care what
> the values are
> its just an anti-optimizer trick nothing more
And if you give it the correct type, doe that make any difference?