-
Notifications
You must be signed in to change notification settings - Fork 79
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
typedef error messages desugar incorrectly #254
Labels
bug
This labels issues that are bugs.
Comments
dtarditi
added a commit
to dtarditi/checkedc-clang
that referenced
this issue
Sep 30, 2017
Checked pointer types were being displayed as unchecked pointer types in "aka" clauses for types named by typedefs that are printed in diagnostics. The "aka" clause displays the underlying type that was typedef'ed. The fix is a one-line change in to pass the pointer type kind through in the Desugar routine in ASTDiagnostics. This change addresses issue microsoft#254. Testing: - Add regression test that checks that checked types display properly in "aka" clauses.
dtarditi
added a commit
that referenced
this issue
Sep 30, 2017
…cs. (#390) Checked pointer types were being displayed as unchecked pointer types in "aka" clauses for types named by typedefs that are printed in diagnostics. The "aka" clause displays the underlying type that was typedef'ed. The fix is a one-line change in to pass the pointer type kind through in the Desugar routine in ASTDiagnostics. This change addresses issue #254. Testing: - Add regression test that checks that checked types display properly in "aka" clauses.
This is fixed. |
dopelsunce
pushed a commit
to dopelsunce/checkedc-clang
that referenced
this issue
Sep 28, 2020
This change improves the formatting of code examples in the Checked C specification. We now use the LaTeX listings package for source code examples and snippets of source code. This should make the source code easier to read. We use a similar color scheme to the one used by Visual Studio for C: blue for keywords, light blue for variables, and black for symbolic characters. The listings package can import examples from source files. This will let us move larger examples to separate source code files and make sure they compile during automated testing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you have a typedef used in a written type, which desugars to a
ptr<T>
orarray_ptr<T>
type, when the error printer desugars the typedef type, it prints it asT *
, which can be confusing.Here is a not-very-confusing example:
However, I've seen examples where I've tried assigning into a
ptr<T>
from aT *
and you get an error message that sayserror: assigning to '_Array_ptr<Node>' (aka 'struct node_t *') from incompatible type 'Node *' (aka 'struct node_t **')
which is a lot more confusing.The text was updated successfully, but these errors were encountered: