This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/1392] warning on WIFEXITED(const int) et al: assignment of read-only member


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]