Title: #if: &&, || and ?: short-circuit · Issue #722 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: #if: &&, || and ?: short-circuit · Issue #722 · cppcheck-opensource/simplecpp
X Title: #if: &&, || and ?: short-circuit · Issue #722 · cppcheck-opensource/simplecpp
Description: In #if, the operand that is not evaluated must not cause an error (C11 6.5.13–6.5.15, used by 6.10.1). #if 0 && (1/0) #endif gcc: no error, condition is false. simplecpp: syntax error: failed to evaluate #if condition, division/modulo by...
Open Graph Description: In #if, the operand that is not evaluated must not cause an error (C11 6.5.13–6.5.15, used by 6.10.1). #if 0 && (1/0) #endif gcc: no error, condition is false. simplecpp: syntax error: failed to ev...
X Description: In #if, the operand that is not evaluated must not cause an error (C11 6.5.13–6.5.15, used by 6.10.1). #if 0 && (1/0) #endif gcc: no error, condition is false. simplecpp: syntax error: fail...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/722
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"#if: &&, || and ?: short-circuit","articleBody":" In `#if`, the operand that is not evaluated must not cause an error (C11 6.5.13–6.5.15, used by 6.10.1).\n\n ```c\n #if 0 && (1/0)\n #endif\n ```\n\n gcc: no error, condition is false.\n simplecpp: `syntax error: failed to evaluate #if condition, division/modulo by zero`\n\n | `#if` expression | gcc | simplecpp |\n |---|---|---|\n | `0 && (1/0)` | false | error: division/modulo by zero |\n | `1 \\|\\| (1/0)` | true | error: division/modulo by zero |\n | `1 ? 2 : (1/0)` | true | error: division/modulo by zero |\n\n","author":{"url":"https://github.com/danmar","@type":"Person","name":"danmar"},"datePublished":"2026-11-06T15:17:23Z","url":"https://github.com/cppcheck-opensource/simplecpp/issues/722"}
| 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:e25a7e9e-071e-f992-2e2e-ef68fb5a880e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A7C:27C5B9:58E7F:80864:6AFC51FA |
| html-safe-nonce | cd8dc2dd67e38ed98f02863938954e06d01738a954862e14fee0107f10419a33 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTdDOjI3QzVCOTo1OEU3Rjo4MDg2NDo2QUZDNTFGQSIsInZpc2l0b3JfaWQiOiI4NDg0NDU5NDI2ODg5ODgwMDU4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b676c96152e9f5f2c5bd264ae22cac4878ad81dfe1a881ea76194e2b7b7aae2b |
| hovercard-subject-tag | issue:6245294117 |
| 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/722/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8479464addf65aa84dd1e2dc253aa380578a1a940972e05c0d1bbf138b7c7f02/cppcheck-opensource/simplecpp/issues/722 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8479464addf65aa84dd1e2dc253aa380578a1a940972e05c0d1bbf138b7c7f02/cppcheck-opensource/simplecpp/issues/722 |
| og:image:alt | In #if, the operand that is not evaluated must not cause an error (C11 6.5.13–6.5.15, used by 6.10.1). #if 0 && (1/0) #endif gcc: no error, condition is false. simplecpp: syntax error: failed to ev... |
| 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