After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 73308 - gcc 3.1 warning on endian swap macros
gcc 3.1 warning on endian swap macros
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: general
1.3.x
Other Linux
: Normal minor
: ---
Assigned To: Matthias Clasen
Matthias Clasen
: 74562 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-03-03 19:49 UTC by Cody Russell
Modified: 2011-02-18 15:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
This patch removes __const__ and realigns backslashes. (2.03 KB, patch)
2002-11-13 17:56 UTC, Pavel Roskin
none Details | Review

Description Cody Russell 2002-03-03 19:49:03 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
Comment 1 Cody Russell 2002-03-09 05:33:44 UTC
This also applies Glib 1.2.
Comment 2 Owen Taylor 2002-03-25 23:18:21 UTC
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)
Comment 3 John Fleck 2002-04-08 13:45:54 UTC
*** Bug 74562 has been marked as a duplicate of this bug. ***
Comment 4 Pavel Roskin 2002-11-13 17:56:52 UTC
Created attachment 12284 [details] [review]
This patch removes __const__ and realigns backslashes.
Comment 5 Pavel Roskin 2002-11-13 18:08:36 UTC
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.
Comment 6 Matthias Clasen 2004-02-25 00:18:50 UTC
1.2.11 won't happen.
Comment 7 Owen Taylor 2004-02-29 19:35:37 UTC
Closing 1.2.11 bugs