On 11/7/05, Inder <[EMAIL PROTECTED]> wrote:
> Hi all,
> I am compiling small program on a SPARC gcc 3.4.3
>
> test.c
> -------------------------------------------------------
>
>
> int main()
> {
>  struct test1* t1, t11;
>  struct test2* t2 ;
>  struct test3* t3;
>
>  t1 = &t11;
>  t2 = (struct t2*)t1;
>  t3 = (struct t3*)t1;

these should indeed give a warning, as you introduce a new structure
t2/t3 here.  You want to use struct test2* and struct test3* here.  If we
don't get a warning here for older compilers it may be due to some weird
interaction in the warning machinery that is confused by the decl for t2/t3.
But this surely isn't going to be fixed in older compilers.

Richard.

Reply via email to