public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/12258] New: -Wold-style-cast triggers on casts in macros from system headers @ 2003-09-12 1:58 stl at caltech dot edu 2003-09-17 5:23 ` [Bug preprocessor/12258] " pinskia at gcc dot gnu dot org 2004-03-13 2:11 ` stl at caltech dot edu 0 siblings, 2 replies; 6+ messages in thread From: stl at caltech dot edu @ 2003-09-12 1:58 UTC (permalink / raw) To: gcc-bugs PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12258 Summary: -Wold-style-cast triggers on casts in macros from system headers Product: gcc Version: 3.3 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: stl at caltech dot edu CC: gcc-bugs at gcc dot gnu dot org See this thread: http://gcc.gnu.org/ml/gcc/2003-09/msg00162.html Basically, if something like #pragma GCC system_header #define NOTHING (int) 0 appears in something.h, and meow.cc consists of #include <something.h> int blah = NOTHING; and meow.cc is compiled with -Wold-style-cast, the warning will trigger. I originally encountered this using MinGW gcc 3.3, but Zack Weinberg's comments in the thread indicate that no version of gcc anywhere yet knows enough to not emit this warning. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/12258] -Wold-style-cast triggers on casts in macros from system headers 2003-09-12 1:58 [Bug c++/12258] New: -Wold-style-cast triggers on casts in macros from system headers stl at caltech dot edu @ 2003-09-17 5:23 ` pinskia at gcc dot gnu dot org 2004-03-13 2:11 ` stl at caltech dot edu 1 sibling, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2003-09-17 5:23 UTC (permalink / raw) To: gcc-bugs PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12258 pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|c++ |preprocessor Ever Confirmed| |1 Keywords| |diagnostic Last reconfirmed|0000-00-00 00:00:00 |2003-09-17 05:14:26 date| | ------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-17 05:14 ------- This is reallly a preprocess failure (as the preprocessor does not tell the front-end that the code is from a system header). It is also related to bug 11931 and bug 7263. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/12258] -Wold-style-cast triggers on casts in macros from system headers 2003-09-12 1:58 [Bug c++/12258] New: -Wold-style-cast triggers on casts in macros from system headers stl at caltech dot edu 2003-09-17 5:23 ` [Bug preprocessor/12258] " pinskia at gcc dot gnu dot org @ 2004-03-13 2:11 ` stl at caltech dot edu 1 sibling, 0 replies; 6+ messages in thread From: stl at caltech dot edu @ 2004-03-13 2:11 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From stl at caltech dot edu 2004-03-13 02:11 ------- My current workaround is similar to what Kai Henningsen proposed: I have my own const constants for #define'd constants, as well as my own functions for #define'd macros (e.g. FD_SET), in a separate header which I then mark as a GCC system header. This produces warning-free code. It's a dirty hack, though. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12258 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <bug-12258-4@http.gcc.gnu.org/bugzilla/>]
* [Bug preprocessor/12258] -Wold-style-cast triggers on casts in macros from system headers [not found] <bug-12258-4@http.gcc.gnu.org/bugzilla/> @ 2010-11-23 18:18 ` hjl at gcc dot gnu.org 2021-12-29 23:40 ` carlosgalvezp at gmail dot com 2021-12-30 10:30 ` redi at gcc dot gnu.org 2 siblings, 0 replies; 6+ messages in thread From: hjl at gcc dot gnu.org @ 2010-11-23 18:18 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12258 --- Comment #3 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2010-11-23 18:09:39 UTC --- Author: hjl Date: Tue Nov 23 18:09:34 2010 New Revision: 167090 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167090 Log: Properly check default linker. 2010-11-23 H.J. Lu <hongjiu.lu@intel.com> PR binutils/12258 * configure.ac: Correct comments for --enable-gold/--enable-ld. Properly check default linker. * configure: Regnerated. Modified: trunk/ChangeLog trunk/configure trunk/configure.ac ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/12258] -Wold-style-cast triggers on casts in macros from system headers [not found] <bug-12258-4@http.gcc.gnu.org/bugzilla/> 2010-11-23 18:18 ` hjl at gcc dot gnu.org @ 2021-12-29 23:40 ` carlosgalvezp at gmail dot com 2021-12-30 10:30 ` redi at gcc dot gnu.org 2 siblings, 0 replies; 6+ messages in thread From: carlosgalvezp at gmail dot com @ 2021-12-29 23:40 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12258 Carlos Galvez <carlosgalvezp at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carlosgalvezp at gmail dot com --- Comment #6 from Carlos Galvez <carlosgalvezp at gmail dot com> --- Hi, This problem seems to be back in GCC 9 and 11: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103862 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/12258] -Wold-style-cast triggers on casts in macros from system headers [not found] <bug-12258-4@http.gcc.gnu.org/bugzilla/> 2010-11-23 18:18 ` hjl at gcc dot gnu.org 2021-12-29 23:40 ` carlosgalvezp at gmail dot com @ 2021-12-30 10:30 ` redi at gcc dot gnu.org 2 siblings, 0 replies; 6+ messages in thread From: redi at gcc dot gnu.org @ 2021-12-30 10:30 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12258 --- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Carlos Galvez from comment #6) > This problem seems to be back in GCC 9 and 11: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103862 As pointed out in a comment there, it's a different case. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-12-30 10:30 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-09-12 1:58 [Bug c++/12258] New: -Wold-style-cast triggers on casts in macros from system headers stl at caltech dot edu 2003-09-17 5:23 ` [Bug preprocessor/12258] " pinskia at gcc dot gnu dot org 2004-03-13 2:11 ` stl at caltech dot edu [not found] <bug-12258-4@http.gcc.gnu.org/bugzilla/> 2010-11-23 18:18 ` hjl at gcc dot gnu.org 2021-12-29 23:40 ` carlosgalvezp at gmail dot com 2021-12-30 10:30 ` redi at gcc dot gnu.org
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).