Title: Lines starting with "#" but contain no preprocessor code seem to confuse simplecpp · Issue #125 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: Lines starting with "#" but contain no preprocessor code seem to confuse simplecpp · Issue #125 · cppcheck-opensource/simplecpp
X Title: Lines starting with "#" but contain no preprocessor code seem to confuse simplecpp · Issue #125 · cppcheck-opensource/simplecpp
Description: As reported in the forum simplecpp seems to have problems with some include files from boost. See for example config.hpp For code like this (similar to how boosts config.hpp is written): # # if 1 # define a 1 # endif int main() { printf(...
Open Graph Description: As reported in the forum simplecpp seems to have problems with some include files from boost. See for example config.hpp For code like this (similar to how boosts config.hpp is written): # # if 1 #...
X Description: As reported in the forum simplecpp seems to have problems with some include files from boost. See for example config.hpp For code like this (similar to how boosts config.hpp is written): # # if 1 #...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/125
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Lines starting with \"#\" but contain no preprocessor code seem to confuse simplecpp","articleBody":"As reported [in the forum](https://sourceforge.net/p/cppcheck/discussion/general/thread/8a0a0174/) simplecpp seems to have problems with some include files from boost.\r\nSee for example [config.hpp](https://github.com/boostorg/preprocessor/blob/develop/include/boost/preprocessor/config/config.hpp)\r\n\r\nFor code like this (similar to how boosts config.hpp is written):\r\n~~~cpp\r\n#\r\n# if 1\r\n# define a 1\r\n# endif\r\n\r\nint main()\r\n{\r\n printf(\"%d\", a);\r\n}\r\n~~~\r\nsimplecpp reports this error:\r\n~~~\r\n$ ./simplecpp include.hpp\r\n\r\ninclude.hpp:4: syntax error: #endif without #if\r\n~~~\r\nRemoving the single `#` at the top makes it work again.\r\nsimplecpp also fails in the same way if a comment follows a `#` like this:\r\n~~~cpp\r\n# //test\r\n# if 1\r\n# define a 1\r\n# endif\r\n\r\nint main()\r\n{\r\n printf(\"%d\", a);\r\n}\r\n~~~\r\nWith gcc the output is just fine:\r\n```\r\n$ gcc -E include.hpp\r\n# 1 \"include.hpp\"\r\n# 1 \"\u003cbuilt-in>\"\r\n# 1 \"\u003ccommand-line>\"\r\n# 1 \"include.hpp\"\r\n\r\n\r\n\r\n\r\n\r\nint main()\r\n{\r\n printf(\"%d\", 1);\r\n}\r\n```\r\n","author":{"url":"https://github.com/versat","@type":"Person","name":"versat"},"datePublished":"2018-04-12T08:41:26Z","url":"https://github.com/cppcheck-opensource/simplecpp/issues/125"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:80c54136-4d61-249e-de98-baf7c1708705 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC70:9C177:47386:67607:6AFC5412 |
| html-safe-nonce | 8bd7f0bc4ea7c97b7f55f79adfedaf78526c149f953c4021a211586d17926554 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzcwOjlDMTc3OjQ3Mzg2OjY3NjA3OjZBRkM1NDEyIiwidmlzaXRvcl9pZCI6IjYzMjYzOTc3NzY5NTEwMDYyMjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 12454ad8fa0ed12f1af470e673b3d8db9d88bda792f65311a58bae5a33754359 |
| hovercard-subject-tag | issue:313629760 |
| 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/125/issue_layout |
| twitter:image | https://opengraph.githubassets.com/86e2d297eb1276514a551fa1614dd5a522b170106137b6e0a83f0ca3b6126fd4/cppcheck-opensource/simplecpp/issues/125 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/86e2d297eb1276514a551fa1614dd5a522b170106137b6e0a83f0ca3b6126fd4/cppcheck-opensource/simplecpp/issues/125 |
| og:image:alt | As reported in the forum simplecpp seems to have problems with some include files from boost. See for example config.hpp For code like this (similar to how boosts config.hpp is written): # # if 1 #... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | versat |
| hostname | github.com |
| expected-hostname | github.com |
| None | b63557e0027d8014589e873df28328da74a4356701bb1a9eab49dbf012ba8fa6 |
| 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 | 0243355b0352c83733a042e0dfb3d75149b51261 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width