This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug regression/40665] dereferencing type-punned pointer warnings cannot be disabled



------- Comment #12 from mikulas at artax dot karlin dot mff dot cuni dot cz  2009-07-07 19:40 -------
So if there was char *buffer = malloc(512) instead of char buffer[512], would
it be correct to cast it to the pointer to structure?

> And it is not about the cast between the pointer types which causes it to be
> undefined but rather the accesses.

What is considered the "access" in that code? Is it the "->" operator? "&"
operator? "=" operator? Cast operator? Or anything else?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40665


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]