-- Forwarded message --
From: Igor Bukanov <[EMAIL PROTECTED]>
Date: Oct 31, 2006 9:48 PM
Subject: Re: return void from void function is allowed.
To: Mike Stump <[EMAIL PROTECTED]>
On 10/31/06, Mike Stump <[EMAIL PROTECTED]> wrote:
This is valid in C++.
GCC 4.1.2 and 4.0.3 incorrectly accepts the following program:
void f();
void g()
{
return f();
}
No warning are issued on my Ubuntu Pentium-M box. Is it a known bug?
Regards, Igor
Consider the following code that starting with GCC 4.1.0 generates
'dereferencing type-punned pointer will break strict-aliasing rules'
warning:
~> cat test.c
struct inner {
struct inner *next;
};
struct outer {
struct inner base;
int value;
};
/* List of outer elements where all oute
On 1/25/06, Robert Dewar <[EMAIL PROTECTED]> wrote:
> A convenient way to get the endianness is to use
> the System.Bit_Order attribute in Ada.
But this requires to run the program on the target which is not
possible with a cross-compiler. Or is there a trick to declare
something in Ada that would
On 1/25/06, Paul Brook <[EMAIL PROTECTED]> wrote:
> Autoconf already has tests for things like this. Something along the lines of:
>
> const char D_P_S_4[sizeof(void *) == 4 : -1 : 1];
> const char D_P_S_8[sizeof(void *) == 8 : -1 : 1];
>
> Then see which compiles, or grep the error messages.
Righ
Is there any option to ask GCC to print various size and alignment
info on the target platform? This would be very nice during cross
compilation when one can not run the executables to autoconfigure for
such parameters.
Currently I consider for that a hack like copiling the following source:
#in