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:c5c5028a-7f40-d316-584a-15f0673a8ea9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B6E2:EE30:1FE399:2A7976:6A4D8714 |
| html-safe-nonce | 25431f4dfa5ffdb08e7561948536f0161e852127a5984b33164076692b1ec5bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkUyOkVFMzA6MUZFMzk5OjJBNzk3Njo2QTREODcxNCIsInZpc2l0b3JfaWQiOiI1NDk2MTU5MzUxNDE5NTM3MTcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5e0650b70bed6120655bba5d87044d4a619d063d20a8d465179418bbffbf4963 |
| 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 | 9f8758a3953dfe943439713a6fa4f90d542a3431f10e861ca03dd7f39009f320 |
| 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 | bffd5484f01713a661b03469b77678f72b6574ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width