This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/1392] warning on WIFEXITED(const int) et al: assignment of read-only member
- From: "sebor at roguewave dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 29 Sep 2005 21:56:33 -0000
- Subject: [Bug libc/1392] warning on WIFEXITED(const int) et al: assignment of read-only member
- References: <20050929174954.1392.sebor@roguewave.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From sebor at roguewave dot com 2005-09-29 21:56 -------
FWIW, looking at the patch, the definition of __WAIT_INT() looks like it might
generate a warning with -Wcast-qual. I suggest to change the cast to (const int*).
$ cat t.cpp && gcc -Wcast-qual t.cpp
#define __WAIT_INT(status) (*(int *) &(status))
int main ()
{
const int status = 0;
return __WAIT_INT(status);
}
t.cpp: In function `int main()':
t.cpp:6: warning: cast from `const int*' to `int*' discards qualifiers from
pointer target type
--
http://sourceware.org/bugzilla/show_bug.cgi?id=1392
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.