public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "manu at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/7263] __extension__ keyword doesn't suppress warning on LL or ULL constants Date: Sun, 10 Aug 2008 23:15:00 -0000 [thread overview] Message-ID: <20080810231351.14184.qmail@sourceware.org> (raw) In-Reply-To: <bug-7263-1664@http.gcc.gnu.org/bugzilla/> ------- Comment #13 from manu at gcc dot gnu dot org 2008-08-10 23:13 ------- (In reply to comment #12) > > I am not sure how that will work. How do you specify a different value of > > system_header for a single location? My understanding is that sysp is for a > > whole line_map, so you cannot just change its value for a single location. > > My understanding is that the problem is that we have a define in a system > header, like this from comment #8: > > #define _Complex_I 1.0iF > > But then we use this macro in user code, and get a warning, because we > lose track of the system-header-ness. Right now c_lex_with_flags calls > cpp_get_token_with_location. This function returns two locations for tokens > coming from a macro expansion: the original location of the token, and also > the location of the start of the expansion. Current we throw away the > former and just use the latter. But, we could be smarter about using > the former location as well. I thought as much until this point. However the issue remains on how to handle the two locations. It would require a lot of changes in both the c-parser and libcpp. The other approach that you mention (encoding the macro expansion in one single location information somehow) would probably be less intrusive. > I think there is another PR (maybe more) where this same idea would make sense. Andrew? Any idea? > This would need some work to handle the token pasting case. [nice idea snipped] > I hope this makes sense and that I'm not missing something :) Yes. We probably do not need the whole macro expansion history, we just need to encode in a single location the current location of the token and the "original" location of the token. On the other hand, I am not sure how the macro expansion information could be used to provide nicer diagnostics. How do you decide to print the unexpanded macro, or the first expansion, or the second expansion? Furthermore, on which context: expanded macro in the context of the original macro or show the first expansion definition or...? Getting us to use one location right is proving to be difficult, doing ranges as LLVM would be nice but no one is working on it, so I thought that two locations final/original was a wild idea. A stack of macro expansions is like science fiction!! ;-) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7263
next prev parent reply other threads:[~2008-08-10 23:15 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-7263-1664@http.gcc.gnu.org/bugzilla/> 2008-04-22 15:27 ` tromey at gcc dot gnu dot org 2008-08-10 19:26 ` manu at gcc dot gnu dot org 2008-08-10 22:18 ` tromey at gcc dot gnu dot org 2008-08-10 23:15 ` manu at gcc dot gnu dot org [this message] 2008-08-11 2:20 ` tromey at gcc dot gnu dot org 2008-08-18 11:33 ` manu at gcc dot gnu dot org 2008-08-18 13:57 ` manu at gcc dot gnu dot org 2008-08-19 19:29 ` tromey at gcc dot gnu dot org 2008-08-19 19:51 ` manu at gcc dot gnu dot org 2010-03-22 18:21 ` tromey at gcc dot gnu dot org 2010-03-23 13:06 ` manu at gcc dot gnu dot org 2010-03-23 15:19 ` tromey at gcc dot gnu dot org 2010-03-30 14:06 ` dodji at gcc dot gnu dot org 2010-05-28 15:34 ` dodji at gcc dot gnu dot org 2010-05-28 15:42 ` dodji at gcc dot gnu dot org 2010-06-04 19:37 ` dodji at gcc dot gnu dot org 2010-06-04 20:22 ` manu at gcc dot gnu dot org 2010-06-09 14:23 ` Dodji Seketeli 2010-06-09 14:32 ` Dodji Seketeli 2010-06-09 14:23 ` dodji at redhat dot com 2010-06-09 14:32 ` dodji at redhat dot com 2010-06-09 17:09 ` dodji at gcc dot gnu dot org 2010-06-09 17:57 ` manu at gcc dot gnu dot org 2010-06-14 14:13 ` dodji at redhat dot com 2010-06-14 14:21 ` dodji at gcc dot gnu dot org 2010-07-02 19:00 ` dodji at gcc dot gnu dot org [not found] <bug-7263-4@http.gcc.gnu.org/bugzilla/> 2010-11-26 0:15 ` dodji at gcc dot gnu.org 2010-11-26 0:30 ` dodji at gcc dot gnu.org 2010-11-26 0:52 ` manu at gcc dot gnu.org 2010-11-26 15:20 ` dodji at gcc dot gnu.org 2010-11-26 21:19 ` dodji at gcc dot gnu.org 2011-07-27 18:13 ` dodji at gcc dot gnu.org 2011-10-17 10:03 ` dodji at gcc dot gnu.org 2011-10-17 10:27 ` dodji at gcc dot gnu.org 2012-05-16 11:06 ` dodji at gcc dot gnu.org 2012-05-16 13:08 ` dodji at gcc dot gnu.org 2023-01-24 19:55 ` pinskia at gcc dot gnu.org [not found] <20020710082600.7263.andrew@andypo.net> 2004-07-19 1:38 ` pinskia at gcc dot gnu dot org 2004-10-07 12:16 ` pinskia at gcc dot gnu dot org 2005-02-09 2:51 ` neroden at gcc dot gnu dot org 2005-02-09 6:15 ` joseph at codesourcery dot com 2005-04-06 11:16 ` jsm28 at gcc dot gnu dot 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=20080810231351.14184.qmail@sourceware.org \ --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).