Title: do not allow floating point literals in preprocessor checks · Issue #612 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: do not allow floating point literals in preprocessor checks · Issue #612 · cppcheck-opensource/simplecpp
X Title: do not allow floating point literals in preprocessor checks · Issue #612 · cppcheck-opensource/simplecpp
Description: #if A == 1.0 int i; #endif This is handled properly but preprocessor checks only support integral expressions. It is also rejected by all major compilers.
Open Graph Description: #if A == 1.0 int i; #endif This is handled properly but preprocessor checks only support integral expressions. It is also rejected by all major compilers.
X Description: #if A == 1.0 int i; #endif This is handled properly but preprocessor checks only support integral expressions. It is also rejected by all major compilers.
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/612
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"do not allow floating point literals in preprocessor checks","articleBody":"```cpp\n#if A == 1.0\nint i;\n#endif\n```\n\nThis is handled properly but preprocessor checks only support integral expressions. It is also rejected by all major compilers.","author":{"url":"https://github.com/firewave","@type":"Person","name":"firewave"},"datePublished":"2026-01-03T06:47:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/612/simplecpp/issues/612"}
| 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:a9e022ea-5401-8661-3e4d-54c0c4b5f1ce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 897E:1F55B6:120275:1A5E21:6A4DFCA3 |
| html-safe-nonce | b63a135c7e3ac79023fcd890ee2fee4ebe594e56d9cb741e76f1405de39f06c2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTdFOjFGNTVCNjoxMjAyNzU6MUE1RTIxOjZBNERGQ0EzIiwidmlzaXRvcl9pZCI6IjQyMTI1NjY3NTI0ODE5MDE3MzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 81fd2c94c2747cc358701aa0382036561ae4f673a48de3569dbc4f05c826c4d3 |
| hovercard-subject-tag | issue:3777778377 |
| 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/612/issue_layout |
| twitter:image | https://opengraph.githubassets.com/75aaeb3fa20410c630925444e0d4228dc03fc4b2e011e740e19949d0d336b48f/cppcheck-opensource/simplecpp/issues/612 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/75aaeb3fa20410c630925444e0d4228dc03fc4b2e011e740e19949d0d336b48f/cppcheck-opensource/simplecpp/issues/612 |
| og:image:alt | #if A == 1.0 int i; #endif This is handled properly but preprocessor checks only support integral expressions. It is also rejected by all major compilers. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | firewave |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5818716c93c6a2925b815402541a32814e43a7b1261c322b0c2df75224289566 |
| 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 | 4314b1df11fa8a565684f3a72dc971e3785da365 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width