public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/1392] New: warning on WIFEXITED(const int) et al: assignment of read-only member
@ 2005-09-29 17:50 sebor at roguewave dot com
2005-09-29 20:45 ` [Bug libc/1392] " cvs-commit at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: sebor at roguewave dot com @ 2005-09-29 17:50 UTC (permalink / raw)
To: glibc-bugs
$ cat t.c && gcc -c t.c
#include <sys/wait.h>
int foo ()
{
const int status = 0;
WIFEXITED (status);
WEXITSTATUS (status);
WIFSIGNALED (status);
WTERMSIG (status);
WIFSTOPPED (status);
WSTOPSIG (status);
WIFCONTINUED (status);
}
t.c: In function `foo':
t.c:7: warning: assignment of read-only member `__in'
t.c:8: warning: assignment of read-only member `__in'
t.c:9: warning: assignment of read-only member `__in'
t.c:10: warning: assignment of read-only member `__in'
t.c:11: warning: assignment of read-only member `__in'
t.c:12: warning: assignment of read-only member `__in'
--
Summary: warning on WIFEXITED(const int) et al: assignment of
read-only member
Product: glibc
Version: 2.3.3
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: sebor at roguewave dot com
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: ppc-suse-linux
GCC host triplet: ppc-suse-linux
GCC target triplet: ppc-suse-linux
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/1392] warning on WIFEXITED(const int) et al: assignment of read-only member
2005-09-29 17:50 [Bug libc/1392] New: warning on WIFEXITED(const int) et al: assignment of read-only member sebor at roguewave dot com
@ 2005-09-29 20:45 ` cvs-commit at gcc dot gnu dot org
2005-09-29 21:56 ` sebor at roguewave dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-29 20:45 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-29 20:44 -------
Subject: Bug 1392
CVSROOT: /cvs/glibc
Module name: libc
Changes by: roland@sources.redhat.com 2005-09-29 20:44:44
Modified files:
posix/sys : wait.h
Log message:
2005-09-29 Roland McGrath <roland@redhat.com>
[BZ #1392]
* posix/sys/wait.h (__WAIT_INT): Rewrite using an initializer,
in case __typeof yields a const-qualified type.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/posix/sys/wait.h.diff?cvsroot=glibc&r1=1.37&r2=1.38
--
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/1392] warning on WIFEXITED(const int) et al: assignment of read-only member
2005-09-29 17:50 [Bug libc/1392] New: warning on WIFEXITED(const int) et al: assignment of read-only member sebor at roguewave dot com
2005-09-29 20:45 ` [Bug libc/1392] " cvs-commit at gcc dot gnu dot org
@ 2005-09-29 21:56 ` sebor at roguewave dot com
2005-09-29 22:03 ` cvs-commit at gcc dot gnu dot org
2005-10-14 6:14 ` drepper at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: sebor at roguewave dot com @ 2005-09-29 21:56 UTC (permalink / raw)
To: glibc-bugs
------- 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/1392] warning on WIFEXITED(const int) et al: assignment of read-only member
2005-09-29 17:50 [Bug libc/1392] New: warning on WIFEXITED(const int) et al: assignment of read-only member sebor at roguewave dot com
2005-09-29 20:45 ` [Bug libc/1392] " cvs-commit at gcc dot gnu dot org
2005-09-29 21:56 ` sebor at roguewave dot com
@ 2005-09-29 22:03 ` cvs-commit at gcc dot gnu dot org
2005-10-14 6:14 ` drepper at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-29 22:03 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-29 22:03 -------
Subject: Bug 1392
CVSROOT: /cvs/glibc
Module name: libc
Changes by: roland@sources.redhat.com 2005-09-29 22:03:14
Modified files:
posix/sys : wait.h
Log message:
2005-09-29 Roland McGrath <roland@redhat.com>
[BZ #1392]
* posix/sys/wait.h [!__GNUC__ || __cplusplus] (__WAIT_INT): Use const.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/posix/sys/wait.h.diff?cvsroot=glibc&r1=1.38&r2=1.39
--
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/1392] warning on WIFEXITED(const int) et al: assignment of read-only member
2005-09-29 17:50 [Bug libc/1392] New: warning on WIFEXITED(const int) et al: assignment of read-only member sebor at roguewave dot com
` (2 preceding siblings ...)
2005-09-29 22:03 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-14 6:14 ` drepper at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: drepper at redhat dot com @ 2005-10-14 6:14 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2005-10-14 06:14 -------
Apparently the sources have been adjusted.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-10-14 6:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-29 17:50 [Bug libc/1392] New: warning on WIFEXITED(const int) et al: assignment of read-only member sebor at roguewave dot com
2005-09-29 20:45 ` [Bug libc/1392] " cvs-commit at gcc dot gnu dot org
2005-09-29 21:56 ` sebor at roguewave dot com
2005-09-29 22:03 ` cvs-commit at gcc dot gnu dot org
2005-10-14 6:14 ` drepper at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).