public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/114007] gcc chokes on __has_cpp_attribute(clang::unsafe_buffer_usage)
Date: Wed, 21 Feb 2024 14:26:07 +0000	[thread overview]
Message-ID: <bug-114007-4-AwoVlnnv8P@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114007-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114007

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Sandiford from comment #14)
> I might have misunderstood the suggestion and so be arguing against
> something that no-one is suggesting, but I think [[__extension__ …]] should
> accept the same things for all standard versions (C23, pre-C23, and GNU). 
> It was intended to be something that header files and macros could use
> without needing to be sensitive to the user's choice of standard.

That is still the case of [[__extension__ arm::streaming]] and similar.
The only thing in the suggestion that would be only sometimes allowed would be
[[__extension__ arm: :streaming]]
(or [[__extension__ arm:/**/:streaming]] etc.
which I'd hope nobody is planning to use in the header files.
Basically, with the flag_iso && !flag_isoc23 modes, :: is not one token but 2,
and while we in some cases could look at location info if they are adjacent in
the source, if column info isn't accurate (too long lines or too many lines)
that information is lost.
Or of course if you'd strongly like to accept [[__extension__ arm: :streaming]]
in all language modes (but it won't be accepted in C++ anyway), I'd at least
like to see accepting [[arm::streaming]] in the flag_iso && !flag_isoc23 modes
(with the usual pedwarn).
If we only wanted adjacent ::s and nothing in between, perhaps the preprocessor
could set some flag on one of the CPP_COLONs (or both) if otherwise for
CPP_OPTION (pfile, scope) it would be creating CPP_SCOPE, and check that flag
during attribute and __has*attribute parsing?

  parent reply	other threads:[~2024-02-21 14:26 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20  9:01 [Bug preprocessor/114007] New: " ro at gcc dot gnu.org
2024-02-20  9:02 ` [Bug preprocessor/114007] " ro at gcc dot gnu.org
2024-02-20  9:09 ` iains at gcc dot gnu.org
2024-02-20  9:11 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-02-20  9:17 ` jakub at gcc dot gnu.org
2024-02-20  9:22 ` jakub at gcc dot gnu.org
2024-02-20  9:29 ` iains at gcc dot gnu.org
2024-02-20  9:31 ` iains at gcc dot gnu.org
2024-02-20  9:35 ` jakub at gcc dot gnu.org
2024-02-20  9:43 ` jakub at gcc dot gnu.org
2024-02-20  9:44 ` jakub at gcc dot gnu.org
2024-02-20 10:01 ` iains at gcc dot gnu.org
2024-02-20 10:12 ` iains at gcc dot gnu.org
2024-02-20 12:04 ` iains at gcc dot gnu.org
2024-02-21 13:58 ` jakub at gcc dot gnu.org
2024-02-21 14:15 ` rsandifo at gcc dot gnu.org
2024-02-21 14:26 ` jakub at gcc dot gnu.org [this message]
2024-02-21 17:04 ` jsm28 at gcc dot gnu.org
2024-02-21 18:29 ` jakub at gcc dot gnu.org
2024-02-22  8:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-02-22  9:45 ` fxcoudert at gmail dot com
2024-02-22  9:45 ` fxcoudert at gmail dot com
2024-02-22  9:50 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-02-22  9:52 ` iains at gcc dot gnu.org
2024-02-22  9:58 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-02-22 10:22 ` jakub at gcc dot gnu.org
2024-02-22 10:31 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-02-22 10:34 ` iains at gcc dot gnu.org
2024-02-22 18:33 ` cvs-commit at gcc dot gnu.org
2024-02-22 18:34 ` jakub at gcc dot gnu.org
2024-03-02  0:39 ` cvs-commit at gcc dot gnu.org
2024-03-04 12:10 ` jakub at gcc dot gnu.org
2024-06-11 10:37 ` cvs-commit at gcc dot gnu.org
2024-06-11 10:50 ` jakub 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-114007-4-AwoVlnnv8P@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: link
Be 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).