Title: bail out on invalid number in `#line` preprocessor directive · Issue #663 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: bail out on invalid number in `#line` preprocessor directive · Issue #663 · cppcheck-opensource/simplecpp
X Title: bail out on invalid number in `#line` preprocessor directive · Issue #663 · cppcheck-opensource/simplecpp
Description: Mentioned in #586 (comment). #line -1 Is being reject by GCC a.cpp:1:7: error: ‘-’ after ‘#line’ is not a positive integer 1 | #line -1 | ^ and Clang a.cpp:1:7: error: #line directive requires a positive integer argument 1 | #line -1 | ^...
Open Graph Description: Mentioned in #586 (comment). #line -1 Is being reject by GCC a.cpp:1:7: error: ‘-’ after ‘#line’ is not a positive integer 1 | #line -1 | ^ and Clang a.cpp:1:7: error: #line directive requires a po...
X Description: Mentioned in #586 (comment). #line -1 Is being reject by GCC a.cpp:1:7: error: ‘-’ after ‘#line’ is not a positive integer 1 | #line -1 | ^ and Clang a.cpp:1:7: error: #line directive requires a po...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/663
X: @github
Domain: Github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bail out on invalid number in `#line` preprocessor directive","articleBody":"Mentioned in https://github.com/cppcheck-opensource/simplecpp/pull/586#discussion_r3446608940.\n\n```cpp\n#line -1\n```\n\nIs being reject by GCC\n\n```\na.cpp:1:7: error: ‘-’ after ‘#line’ is not a positive integer\n 1 | #line -1\n | ^\n```\n\nand Clang\n```\na.cpp:1:7: error: #line directive requires a positive integer argument\n 1 | #line -1\n | ^\n```\n\nbut we just accept it.\n\nSee https://en.cppreference.com/cpp/preprocessor/line.","author":{"url":"https://github.com/firewave","@type":"Person","name":"firewave"},"datePublished":"2026-06-22T09:49:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/663/simplecpp/issues/663"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9e4d95a9-80d9-3998-40d2-8bc1ea27ee2e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F28:2F2710:43ED72:5FA279:6A62FB67 |
| html-safe-nonce | c1f6e3f085676a7ef5bfb6037addb1e9daddbf4a5573399b3eb19708818bc59c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjI4OjJGMjcxMDo0M0VENzI6NUZBMjc5OjZBNjJGQjY3IiwidmlzaXRvcl9pZCI6IjQyMDU3NDUzMzUwOTk5MTUxMTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c908313661aae9ba36605a2b0c423c0f34102edd69160f6f37a880fc55557bc9 |
| hovercard-subject-tag | issue:4715424040 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cppcheck-opensource/simplecpp/663/issue_layout |
| twitter:image | https://opengraph.githubassets.com/205ebb05076d58e877f9a1132968b8b8a957a4c3ec1e9a57e93941ec9e0a3f71/cppcheck-opensource/simplecpp/issues/663 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/205ebb05076d58e877f9a1132968b8b8a957a4c3ec1e9a57e93941ec9e0a3f71/cppcheck-opensource/simplecpp/issues/663 |
| og:image:alt | Mentioned in #586 (comment). #line -1 Is being reject by GCC a.cpp:1:7: error: ‘-’ after ‘#line’ is not a positive integer 1 | #line -1 | ^ and Clang a.cpp:1:7: error: #line directive requires a po... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | firewave |
| hostname | github.com |
| expected-hostname | github.com |
| None | 59e40dc698184067b40ef2d941585f66ed42711564a879644f984f1eacea129c |
| turbo-cache-control | no-preview |
| go-import | github.com/cppcheck-opensource/simplecpp git https://github.com/cppcheck-opensource/simplecpp.git |
| octolytics-dimension-user_id | 278097703 |
| octolytics-dimension-user_login | cppcheck-opensource |
| octolytics-dimension-repository_id | 33434464 |
| octolytics-dimension-repository_nwo | cppcheck-opensource/simplecpp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33434464 |
| octolytics-dimension-repository_network_root_nwo | cppcheck-opensource/simplecpp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b4f544bf80583e749557efd76afda56317b6252d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width