Re: Confusing error for incorrect struct initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18/06/2016 18:42, lh mouse wrote:

> Initializing a `int *` with an `int` has to be permitted.
> It is making it an error that would be a bug.

The code I'm interested in is:

struct xxx { void *p; int a,b,c,d; double x,y; };
struct foo { struct xxx *p; int e,f,g; };
struct xxx s;
struct foo bar = { s }; /*** should be &s ***/

(I don't see any int pointers there.)

Do you see the error on the last line?
What error message would you expect a good compiler to output?

Regards.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux