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

misleading #line directive error message fix #62

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

Conversation

l0uda
Copy link

@l0uda l0uda commented Mar 21, 2022

All the reasons of commit are described in a bug report in bugzilla there https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105005 .

results of edge case testing with adequate console output after "gcc -E example.c -o example" command:
1)

1 #line
2 #warning "some warning, not an EOF"
example.c:1:6: error: missing #line directive arguments
    1 | #line
      |      ^
example.c:2:2: warning: #warning "some warning, not an EOF" [-Wcpp]
    2 | #warning "some warning, not an EOF"
      |  ^~~~~~~
1 #line
2  
example.c:1:6: error: missing #line directive arguments
    1 | #line
      |      ^
1 #line
example.c:1:6: error: unexpected end of file after #line
    1 | #line
      |      ^

@MLopez-Ibanez
Copy link

This is a read-only mirror that is not managed by GCC developers.

Pull requests in this read-only mirror will be ignored forever.

If you wish to contribute to GCC please read: https://gcc.gnu.org/wiki/GettingStarted

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