This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: simple example -O3 optimizer problem?
- From: Dennis Luehring <dl dot soluz at gmx dot net>
- To: Andrew Haley <aph at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 18 Jul 2014 10:40:19 +0200
- 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>
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?
Andrew.
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