GNOME Bugzilla – Bug 73308
gcc 3.1 warning on endian swap macros
Last modified: 2011-02-18 15:47:08 UTC
GUINT16_SWAP_LE_BE_X86 GUINT32_SWAP_LE_BE_X86 These two macros cause a warning using gcc 3.1: "const qualifier ignored on asm" This was solved by removing __const__ from them, but I don't know if this is the correct solution. I'm using Linux kernel 2.4.14, Glibc 2.2.4, gcc 3.1 20020205
This also applies Glib 1.2.
Mon Mar 25 18:13:06 2002 Owen Taylor <otaylor@redhat.com> * glib/gtypes.h (GUINT*_SWAP_LE_BE_X86): Remove __const__ qualifier from __asm__ statements... GCC since at least 2.96 has assumed no side effects automaticaly, and gcc-3.1 will warn about this usage. (#73308, Cody Russell)
*** Bug 74562 has been marked as a duplicate of this bug. ***
Created attachment 12284 [details] [review] This patch removes __const__ and realigns backslashes.
The patch needs to be propagated to glib 1.2.x branch. Even if you don't plan to release 1.2.11, it's better to have the patch on CVS in case if you have to make a release for some other reason (e.g. security). My patch is against 1.2.x branch. The warning is observed in gcc 3.2 as well. It doesn't need any -W flags to be shown. It has already been reported twice as a warning in GNU Midnight Commander, and I cannot do anything short of stopping using those macros or redefining them. Obviously, upgrade to glib 2.x is not an answer for many users.
1.2.11 won't happen.
Closing 1.2.11 bugs