Title: Do not abort when there is #ifdef in macro expansion list · Issue #572 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: Do not abort when there is #ifdef in macro expansion list · Issue #572 · cppcheck-opensource/simplecpp
X Title: Do not abort when there is #ifdef in macro expansion list · Issue #572 · cppcheck-opensource/simplecpp
Description: Example code: #define dostuff(X) X dostuff( #ifdef A 1 #endif -1 ) simplecpp writes an error message and aborts: 1.c:5: syntax error: failed to expand 'dostuff', it is invalid to use a preprocessor directive as macro parameter This error...
Open Graph Description: Example code: #define dostuff(X) X dostuff( #ifdef A 1 #endif -1 ) simplecpp writes an error message and aborts: 1.c:5: syntax error: failed to expand 'dostuff', it is invalid to use a preprocessor...
X Description: Example code: #define dostuff(X) X dostuff( #ifdef A 1 #endif -1 ) simplecpp writes an error message and aborts: 1.c:5: syntax error: failed to expand 'dostuff', it is invalid to use a prep...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/572
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Do not abort when there is #ifdef in macro expansion list","articleBody":"Example code:\n```\n#define dostuff(X) X\n\ndostuff(\n#ifdef A\n 1\n#endif\n -1\n)\n```\n\nsimplecpp writes an error message and aborts:\n```\n1.c:5: syntax error: failed to expand 'dostuff', it is invalid to use a preprocessor directive as macro parameter\n```\n\nThis error message is correct and it's great that simplecpp warns for this.\n\nBut customers don't like that simplecpp aborts. Compilers will typically preprocess it without warnings. gcc preprocess it to `1-1` if A is defined, and `-1` if A is not defined.\n","author":{"url":"https://github.com/danmar","@type":"Person","name":"danmar"},"datePublished":"2025-10-16T15:51:24Z","url":"https://github.com/cppcheck-opensource/simplecpp/issues/572"}
| 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:2fd0d9c3-adfb-b8a0-d67b-c1d85150aa81 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F1A:2F4424:20C0DA:2D5F94:6AFC4AB7 |
| html-safe-nonce | f24c52525002e7219a62a9f30708a567f9366029523f65c35ae00cee3b6a2be0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjFBOjJGNDQyNDoyMEMwREE6MkQ1Rjk0OjZBRkM0QUI3IiwidmlzaXRvcl9pZCI6IjY4NDQ5NDM2NjU1MjE3NzMyMzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 680c82524e3345c67402bde69c744f0e16a504e220af82aa6f2f6c05eb6dc381 |
| hovercard-subject-tag | issue:3522481874 |
| 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/572/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1da820d0f0e214d4e2e88b6cd843fd2aa4329e55fbe69c5c18567d8b6e7ac92e/cppcheck-opensource/simplecpp/issues/572 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1da820d0f0e214d4e2e88b6cd843fd2aa4329e55fbe69c5c18567d8b6e7ac92e/cppcheck-opensource/simplecpp/issues/572 |
| og:image:alt | Example code: #define dostuff(X) X dostuff( #ifdef A 1 #endif -1 ) simplecpp writes an error message and aborts: 1.c:5: syntax error: failed to expand 'dostuff', it is invalid to use a preprocessor... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | danmar |
| hostname | github.com |
| expected-hostname | github.com |
| None | 20dfdada12bc00bbf8065dc10dfe3ff3711b85db5cc117f83296f8074e861960 |
| 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 | 041909865f220ab51714e7efdc276dd349a99ade |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width