Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6584031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:29:10+00:00 2026-05-25T16:29:10+00:00

In N3291 7.6.1.(3/5) Attribute Syntax and semantics [decl.attr.grammar] concerning how attributes are written in

  • 0

In N3291 “7.6.1.(3/5) Attribute Syntax and semantics [decl.attr.grammar]” concerning how attributes are written in source code I read

The use of an attribute-scoped-token is conditionally-supported, with
implementation-defined behavior.

and

For an attribute-token not specified in this International Standard, the behavior is implementation-defined.

Does this mean, that attribute specifications like

[[ dllexport ]]
[[ hiding ]]
[[ unused ]]
[[ vendor::attrib ]]

may be complained about by a standard conforming compiler? So, it could report an error and stop compilation?

I would have hoped that a compiler should ignore attributes that it does not know how to handle them. Ok, that might be dangerous, because typos in attributes may be overlooked, for example [[ noretrun ]] or [[ carrys_dependencie ]] 🙂

But especially namespaces would help here, right? When I compile [[ gcc::mips ]] on an Microsoft compiler that one should be able to ignore that and not reject it, right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:29:11+00:00Added an answer on May 25, 2026 at 4:29 pm

    C++17 adds an explicit statement that attributes not recognized by an implementation are to be ignored. Before C++17, all attribute behavior was implementation defined, so the implementation could do anything.

    Part of the purpose of the attribute specification is so that compiler makers will stop cluttering the language up with special syntax and keywords. To give them a single grammar for specifying these things. It is a way to associate a compiler-defined string with a particular object or definition.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had this lambda somewhere in my code: [](bool a, bool=true){ return !a;} }
Looking into the standard N3291 I do not find any reference for tuple to
I've been looking through the N3291 working draft of C++0x. And I was curious
According to this answer , namespace-scoped static variables were undeprecated in C++11. That is,
When I'm reading the C++ standard, it seems that the following code is perfectly
I noticed, that in [24.4.7] of the last C++-Std Doc N3291 max ist not
Do I understand the new Std right that shared_ptr is not required to use
Consider the following code: struct Base {}; struct Derived : public virtual Base {};
Taken from the C++0x FDIS (n3290): If a lambda-expression does not include a lambda-declarator,
According to N3290, std::unique_ptr accepts a deleter argument in its constructor. However, I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.