public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/91669] #pragma's and _Pragma's work but _Pragma's used in an equivalent macro don't Date: Fri, 29 Oct 2021 17:40:33 +0000 [thread overview] Message-ID: <bug-91669-4-TTmVyO5kXE@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-91669-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91669 --- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> --- Comparing the two inside handle_pragma_visibility: * the no-save-temps version has as 'loc' the line pointing to _Pragma(#__VA_ARGS__) * with -save-temps, 'loc' == 'input_location'. But: control_warning_option is called with input_location and not 'loc', thus that should not be the reason for the issue. * * * However, if one does a deep dive into update_effective_level_from_pragmas, the difference seems to be only the column number. There is: if (!linemap_location_before_p (line_table, pragloc, loc)) continue; Without -save-temps, there is (with warnings + notes added for debugging): foo.c:29:1: warning: update_effective_level_from_pragmas - pragloc 29 | BX_retundef(}) | ^~~~~~~~~~~ foo.c:29:13: note: loc is here 29 | BX_retundef(}) | ^ thus loc > pragloc But -save-temps, i.e. working on the preprocessed input, there is: foo.c:29:9: warning: update_effective_level_from_pragmas - pragloc 29 | BX_retundef(}) | ^~~ foo.c:29:2: note: loc is here 29 | BX_retundef(}) | ^ That is: loc < pragloc
next prev parent reply other threads:[~2021-10-29 17:40 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-91669-4@http.gcc.gnu.org/bugzilla/> 2021-10-29 16:25 ` burnus at gcc dot gnu.org 2021-10-29 17:40 ` burnus at gcc dot gnu.org [this message] 2022-09-30 23:00 ` lhyatt at gcc dot gnu.org 2022-10-04 1:29 ` cvs-commit at gcc dot gnu.org 2022-10-04 1:34 ` lhyatt at gcc dot gnu.org 2022-10-19 20:29 ` lhyatt 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-91669-4-TTmVyO5kXE@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).