Hi,
why does gcc (4.4.7 and 4.8.2) sometimes warn and sometimes not warn
when undefined behavior is invoked when making illegal function
pointer conversions?
For instance, consider the code below:
-
/* Tested with gcc 4.4.7 and 4.8.2 */
#include
#include
bool boolFunctionThatReturnsFa
On Sun, Mar 29, 2015 at 3:26 PM, Andreas Schwab wrote:
> Godmar Back writes:
>
>> ps: I would like to see the warning, of course, since casting a bool
>> returning function to an int returning function is undefined behavior.
>
> The cast itself is ok, the undefined b
Hi,
I'm using gcc version 4.1.2 20080704 (Red Hat 4.1.2-44) for a x86
target. The info page says:
`-mpush-args'
`-mno-push-args'
Use PUSH operations to store outgoing parameters. This method is
shorter and usually equally fast as method using SUB/MOV
operations and is enabled by d
Minor correction to my previous email:
On Tue, Sep 1, 2009 at 10:08 AM, Godmar Back wrote:
>
> gb...@setzer [39](~/tmp) > cat call.c
> void caller(void) {
> extern void callee(int);
> callee(5);
> }
This:
> gb...@setzer [40](~/tmp) > gcc -mno-push-args -S cal
On Tue, Sep 1, 2009 at 12:31 PM, Ian Lance Taylor wrote:
> Godmar Back writes:
>
>> It appears to me that '-mno-push-args' is the enabled by default (*),
>> and not '-mpush-args'.
>
> The default varies by processor--it dependson the -mtune option.
Hi,
this may be a FAQ - in my class today when discussing how gcc
generates code for x86, I was stumped when I showed an example of how
gcc handles attempts to modify (read-only) string literals/constants.
(I'm sending this to gcc rather than gcc-help because I'm asking for a
design rationale - I
On Tue, Sep 14, 2010 at 2:35 PM, Ian Lance Taylor wrote:
>
> I think this is simply a bug. It doesn't happen with current gcc. With
> gcc 4.4.3 the assignment is being eliminated because it is considered to
> be dead code.
>
> I agree that it is an error for gcc to simply eliminate this assignme