public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55252] Caret diagnostic doesn't show useful location when macro clashes with name in system header Date: Sat, 10 Nov 2012 23:10:00 -0000 [thread overview] Message-ID: <bug-55252-4-LT2CkQDOag@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55252-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55252 --- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-11-10 23:10:32 UTC --- On the other hand, let's consider: pr55252.c: #define bar 256 #include "pr55252.h" pr55252.h: #pragma GCC system_header signed char foo = bar; In this case, I would expect the warning to be suppressed (as it is with -ftrack-macro-expansion=0). However, since the warning is actually given in the C file, it is emitted. I am getting more and more convinced that expanding to spelling point might not be the best (I think Paolo Bonzini raised this issue at the time...). On the other hand, this is a very contrived testcase. I wouldn't expect in normal code that the expansion point to be in a system-header and the spelling point in a non-system-header. Dodji, what do you think?
next prev parent reply other threads:[~2012-11-10 23:10 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-09 18:07 [Bug c++/55252] New: " redi at gcc dot gnu.org 2012-11-09 18:08 ` [Bug c++/55252] " redi at gcc dot gnu.org 2012-11-09 21:02 ` manu at gcc dot gnu.org 2012-11-10 22:58 ` manu at gcc dot gnu.org 2012-11-10 23:10 ` manu at gcc dot gnu.org [this message] 2012-11-10 23:20 ` redi at gcc dot gnu.org 2012-11-19 16:17 ` dodji at seketeli dot org 2012-11-19 16:34 ` dodji at seketeli dot org 2012-11-19 16:50 ` manu at gcc dot gnu.org 2012-11-19 17:06 ` dodji at seketeli dot org 2012-11-19 17:18 ` dodji at seketeli dot org 2013-11-01 15:30 ` manu at gcc dot gnu.org 2013-11-01 21:33 ` manu at gcc dot gnu.org 2014-05-13 15:53 ` tromey at gcc dot gnu.org 2014-07-15 16:29 ` tromey at gcc dot gnu.org 2014-07-15 16:32 ` tromey at gcc dot gnu.org 2015-02-01 20:29 ` manu at gcc dot gnu.org 2015-02-03 10:35 ` dodji at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-55252-4-LT2CkQDOag@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).