This is the mail archive of the gcc-patches@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]

Re: [PATCH] Fix const pointer warning in gthr-win32.h


"Aaron W. LaFramboise" <aaronavay62@aaronwl.com> writes:

> OK, I discovered this file is also used in other places outside of GCC
> such as in libgfortran, so using tsystem.h is not OK there.  What is
> the  proper way to make this error go away then, as I understand the
> union trick is the only way to silence it?
>
>
> By the way, I think this prototype is actually incorrect.  The ptr
> parameter really should not be const, because __gthread_getspecific
> returns a non-const void *.  However, I'm not sure if there's some
> other reason this should be const; does anyone know about this?

What code are you compiling when you see this warning?  As far as I
know code that uses gthr-win32.h is mostly C code which should be
compiled with -Wc++-compat.

Ian


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