Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[temp.res.general] Fix misleading example related to syntax errors #6577

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Eisenwave
Copy link
Contributor

The use of the word "may" suggests that an implementation isn't required to diagnose +; if it's in a template, but this is not true. Diagnostics are always required for syntax errors.

As you can see, a syntax error inevitably "bubbles upwards" in the grammar, and also means that any containing template isn't a template in the first place. If there is no containing template, and there isn't even a valid translation-unit, then diagnostics are required because syntax errors fall under the umbrella of diagnosable rules.

Unless "no diagnostic required" was explicitly stated, the following applies:

[...] if a program contains a violation of any diagnosable rule or an occurrence of a construct described in this document as “conditionally-supported” when the implementation does not support that construct, a conforming implementation shall issue at least one diagnostic message.

- [intro.compliance.general] p2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant