Title: Wrong handling of #x in macro · Issue #296 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: Wrong handling of #x in macro · Issue #296 · cppcheck-opensource/simplecpp
X Title: Wrong handling of #x in macro · Issue #296 · cppcheck-opensource/simplecpp
Description: Example code: #define bar(x) x % 2 #define foo(x) printf(#x "\n") foo(bar(3)); gcc output: printf("bar(3)" "\n"); simplecpp output: printf("3%2" "\n");
Open Graph Description: Example code: #define bar(x) x % 2 #define foo(x) printf(#x "\n") foo(bar(3)); gcc output: printf("bar(3)" "\n"); simplecpp output: printf("3%2" "\n");
X Description: Example code: #define bar(x) x % 2 #define foo(x) printf(#x "\n") foo(bar(3)); gcc output: printf("bar(3)" "\n"); simplecpp output: printf("3%2" "\n&quo...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/296
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrong handling of #x in macro","articleBody":"Example code:\r\n\r\n```\r\n#define bar(x) x % 2\r\n#define foo(x) printf(#x \"\\n\")\r\n\r\nfoo(bar(3));\r\n```\r\n\r\ngcc output:\r\n\r\n```\r\nprintf(\"bar(3)\" \"\\n\");\r\n```\r\n\r\nsimplecpp output:\r\n\r\n```\r\nprintf(\"3%2\" \"\\n\");\r\n```\r\n","author":{"url":"https://github.com/danmar","@type":"Person","name":"danmar"},"datePublished":"2023-05-09T16:09:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/296/simplecpp/issues/296"}
| 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:a9e91b71-de8b-9d55-7d9c-5572c2cf519b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D284:1FFDFF:19449D3:228388C:6A4F17D1 |
| html-safe-nonce | ba1f6ba4d735a6ddc471ffc2451afd3be71a88fa9d027125dc77bf963b57d576 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjg0OjFGRkRGRjoxOTQ0OUQzOjIyODM4OEM6NkE0RjE3RDEiLCJ2aXNpdG9yX2lkIjoiMTA4MTc1NzQ0MTY0MzcxNDUxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 487d21f4fd252a0f3211b2f329df1a4d1edcd684952a333c9de50c137ce249ad |
| hovercard-subject-tag | issue:1702336892 |
| 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/296/issue_layout |
| twitter:image | https://opengraph.githubassets.com/81ee4e723094e6634a4ae84caec4c9fc99dfccbdf16d66fea286b1aafdd42309/cppcheck-opensource/simplecpp/issues/296 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/81ee4e723094e6634a4ae84caec4c9fc99dfccbdf16d66fea286b1aafdd42309/cppcheck-opensource/simplecpp/issues/296 |
| og:image:alt | Example code: #define bar(x) x % 2 #define foo(x) printf(#x "\n") foo(bar(3)); gcc output: printf("bar(3)" "\n"); simplecpp output: printf("3%2" "\n"); |
| 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 | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| 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 | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width