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

Tighten up C source code scanning #408

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

DemiMarie
Copy link
Contributor

  • Parse C99/C++ line comments correctly
  • Error if trigraphs present and could affect compilation.
  • Reject invalid escaped newlines in many places
  • Reject escaped newlines in a comment start or end, or in a line
    comment.

* Parse C99/C++ line comments correctly
* Error if trigraphs present and could affect compilation.
* Reject invalid escaped newlines in many places
* Reject escaped newlines in a comment start or end, or in a line
  comment.
@DemiMarie
Copy link
Contributor Author

The main motivation for this change is that many (if not most) tools (that are not compilers) mishandle these constructs, and this probably includes other implementations of Lex.

If the code is not actually C++, these need to be rejected (by a
`#error`).  This will be done later.
@westes
Copy link
Owner

westes commented Apr 2, 2024

There's been a lot of activity which has produced conflicts. Could you rebase against master and resolve the conflicts?

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.

2 participants