Title: ##: valid token pastes are rejected · Issue #724 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: ##: valid token pastes are rejected · Issue #724 · cppcheck-opensource/simplecpp
X Title: ##: valid token pastes are rejected · Issue #724 · cppcheck-opensource/simplecpp
Description: When the left operand of ## is an operator, valid pastes are rejected. #define cat(a,b) a##b cat(+,=) gcc: += simplecpp: syntax error: failed to expand 'cat', Invalid ## usage when expanding 'cat': Combining '+' and 'b' yields an invalid...
Open Graph Description: When the left operand of ## is an operator, valid pastes are rejected. #define cat(a,b) a##b cat(+,=) gcc: += simplecpp: syntax error: failed to expand 'cat', Invalid ## usage when expanding 'cat':...
X Description: When the left operand of ## is an operator, valid pastes are rejected. #define cat(a,b) a##b cat(+,=) gcc: += simplecpp: syntax error: failed to expand 'cat', Invalid ## usage when expandin...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/724
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"##: valid token pastes are rejected","articleBody":" When the left operand of `##` is an operator, valid pastes are rejected.\n\n ```c\n #define cat(a,b) a##b\n cat(+,=)\n ```\n\n gcc: `+=`\n simplecpp: `syntax error: failed to expand 'cat', Invalid ## usage when expanding 'cat': Combining '+' and 'b' yields an invalid\n token.`\n\n | Input | gcc | simplecpp |\n |---|---|---|\n | `cat(+,=)` | `+=` | error |\n | `cat(\u003c\u003c,=)` | `\u003c\u003c=` | error |\n | `cat(-,>)` | `->` | error |\n | `cat(&,&)` | `&&` | error |\n | `cat(\\|,\\|)` | `\\|\\|` | error |\n | `cat(+,+)` | `++` | error |\n | `#define B -##>`⏎`B` | `->` | error: Unexpected token '>' |\n\n","author":{"url":"https://github.com/danmar","@type":"Person","name":"danmar"},"datePublished":"2026-11-06T16:56:10Z","url":"https://github.com/cppcheck-opensource/simplecpp/issues/724"}
| 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:094653a7-26b1-a231-ba62-799086a6a581 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DCDA:17565D:3C969F:5435A3:6AFC5205 |
| html-safe-nonce | 969a90c39f33d1f77681e551405a636a00764bb696f1091a74c47574b49bad49 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQ0RBOjE3NTY1RDozQzk2OUY6NTQzNUEzOjZBRkM1MjA1IiwidmlzaXRvcl9pZCI6IjQ4NzgzOTk2OTg0NTEzMDI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bb0a9ef52b24f66d606e7db050024a4d230622b4507522fa422337dfc53538e2 |
| hovercard-subject-tag | issue:6246967289 |
| 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/724/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6222ff1fc3d041c199c3b3a46232e5e0f006b851939e5d77c39d159707a439cb/cppcheck-opensource/simplecpp/issues/724 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6222ff1fc3d041c199c3b3a46232e5e0f006b851939e5d77c39d159707a439cb/cppcheck-opensource/simplecpp/issues/724 |
| og:image:alt | When the left operand of ## is an operator, valid pastes are rejected. #define cat(a,b) a##b cat(+,=) gcc: += simplecpp: syntax error: failed to expand 'cat', Invalid ## usage when expanding 'cat':... |
| 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 | 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