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] | |
From: "Ian Lance Taylor" <iant@google.com>
"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?
Is it possible to fix (i.e. const-ify) the relevant function prototypes, or do you end up calling a system interface that's non-const and get stuck?
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.
I think the warning comes from -Wcast-qual, not -Wc++-compat.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |