Re: inappropriate "discards qualifiers from pointer target type" warning

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

 



John Breitenbach wrote:

>  I think I'm seeing a bug with gcc which came in between 4.1.1 and 4.2.
> 
> I've got a function which takes a const void * and casts it to a void *
> when passing it to another function.  ONLY if the target function is in
> the same module, I get the subject warning.  A simple extern declaration
> does not produce any warnings.  Also, I see it at >= O3 or Os.  This
> does not show up at O2.
> 
> You will notice that without the explicit cast, I get the warning
> TWICE.  Thanks for any advice.

This all seems to be fixed in 4.3: without the cast you get the warning.

Andrew.

[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