Title: Wrong token pasting/concatenation when token contains spaces · Issue #124 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: Wrong token pasting/concatenation when token contains spaces · Issue #124 · cppcheck-opensource/simplecpp
X Title: Wrong token pasting/concatenation when token contains spaces · Issue #124 · cppcheck-opensource/simplecpp
Description: Stumbled over this issue when i added a define for the Qt macro Q_D(), see Cppcheck ticket https://trac.cppcheck.net/ticket/8479. For this C code: #define CONCAT(tok) tok##suffix CONCAT(Test); CONCAT(const Test); gcc outputs: $ gcc -E to...
Open Graph Description: Stumbled over this issue when i added a define for the Qt macro Q_D(), see Cppcheck ticket https://trac.cppcheck.net/ticket/8479. For this C code: #define CONCAT(tok) tok##suffix CONCAT(Test); CONC...
X Description: Stumbled over this issue when i added a define for the Qt macro Q_D(), see Cppcheck ticket https://trac.cppcheck.net/ticket/8479. For this C code: #define CONCAT(tok) tok##suffix CONCAT(Test); CONC...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/124
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrong token pasting/concatenation when token contains spaces","articleBody":"Stumbled over this issue when i added a define for the Qt macro Q_D(), see Cppcheck ticket https://trac.cppcheck.net/ticket/8479.\r\nFor this C code:\r\n```\r\n#define CONCAT(tok) tok##suffix\r\n\r\nCONCAT(Test);\r\nCONCAT(const Test);\r\n```\r\ngcc outputs:\r\n```\r\n$ gcc -E token_pasting_with_space.c\r\n# 1 \"token_pasting_with_space.c\"\r\n# 1 \"\u003cbuilt-in\u003e\"\r\n# 1 \"\u003ccommand-line\u003e\"\r\n# 1 \"token_pasting_with_space.c\"\r\n\r\n\r\nTestsuffix;\r\nconst Testsuffix;\r\n```\r\nsimplecpp outputs:\r\n```\r\n$ ./simplecpp token_pasting_with_space.c\r\n\r\n\r\nTestsuffix ;\r\nconstTestsuffix ;\r\n```\r\nThe space between \"const\" and \"Test\" is removed.\r\nNot sure what the standard says about such a case but since Qt and gcc are widely used i guess it should work like Qt expects it and gcc handles it to not break things.","author":{"url":"https://github.com/versat","@type":"Person","name":"versat"},"datePublished":"2018-04-12T07:24:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/124/simplecpp/issues/124"}
| 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:d4701f49-4a8a-b2e6-a4e9-ecc909ae8a54 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCB2:3E375C:24F380B:3392B12:6A50C3E8 |
| html-safe-nonce | 00ac3cd88c3c2a2f837f7e04e1e81138613fe49b5aed3f2b4067699e10527e3b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0IyOjNFMzc1QzoyNEYzODBCOjMzOTJCMTI6NkE1MEMzRTgiLCJ2aXNpdG9yX2lkIjoiOTAyNjgxMzQyNzI3MjY5NjgwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | aeebcfaca54a4f890322389696d7669a4c972e0a31fec38a8dd53af6fde132aa |
| hovercard-subject-tag | issue:313606211 |
| 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/124/issue_layout |
| twitter:image | https://opengraph.githubassets.com/eaaff683063ebae4eaf8c02780a150128671d0246b118e50a8550e00e40c4b8b/cppcheck-opensource/simplecpp/issues/124 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/eaaff683063ebae4eaf8c02780a150128671d0246b118e50a8550e00e40c4b8b/cppcheck-opensource/simplecpp/issues/124 |
| og:image:alt | Stumbled over this issue when i added a define for the Qt macro Q_D(), see Cppcheck ticket https://trac.cppcheck.net/ticket/8479. For this C code: #define CONCAT(tok) tok##suffix CONCAT(Test); CONC... |
| 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 | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| 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 | 08e79d53fc070870d5b168356afebb1e286a2ffe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width