Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G gcc
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 39
    • Merge requests 39
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gcc-mirror
  • gcc
  • Merge requests
  • !62

misleading #line directive error message fix

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open l0uda requested to merge github/fork/l0uda/master into master Mar 21, 2022
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 1

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
      |      ^
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/l0uda/master