public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "lhyatt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/83256] inconsistent _Pragma behavior in multi-line macros Date: Tue, 04 Oct 2022 22:35:40 +0000 [thread overview] Message-ID: <bug-83256-4-oCb0cwgVJN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-83256-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83256 Lewis Hyatt <lhyatt at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED CC| |lhyatt at gcc dot gnu.org --- Comment #5 from Lewis Hyatt <lhyatt at gcc dot gnu.org> --- For the testcases in comment 2 and comment 4, the problem was the loss of macro tracking information for the _Pragma token, and r9-1926 (for PR69558) fixed that, resolving a large class of diagnostic _Pragma location problems including these. For the current PR's original testcase (attachment 42777), there are two separate issues combined together: -For -Wuninitialized, this was caused for both C and C++ by -Wuninitialized using the spelling location rather than the macro expansion location. It has been fixed recently (r13-2994) for GCC 13. That fix has so far not been backported but it would backport fine if someone wants it. -For -Wattribute-alias, this one is applicable only to C, since C++ issues a hard error for this testcase rather than a warning. Note, to avoid potential confusion, the testcase as posted does not fail, it is needed to remove the "struct s;" line to exhibit the problem. This was fixed by r13-1596 (for PR97498) and was the same issue. (That was the fact that in C, input_location was often pointing to the start of the line.) This is backported to 10,11,12 branches already. It seems to me that the testcases added for the above three cases cover everything in this PR, so I am resolving it now.
parent reply other threads:[~2022-10-04 22:35 UTC|newest] Thread overview: expand[flat|nested] mbox.gz Atom feed [parent not found: <bug-83256-4@http.gcc.gnu.org/bugzilla/>]
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-83256-4-oCb0cwgVJN@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).