Title: syntax error caused by unconditional `__has_cpp_attribute` usage · Issue #534 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: syntax error caused by unconditional `__has_cpp_attribute` usage · Issue #534 · cppcheck-opensource/simplecpp
X Title: syntax error caused by unconditional `__has_cpp_attribute` usage · Issue #534 · cppcheck-opensource/simplecpp
Description: Encountered while working on #438. # if __has_cpp_attribute(maybe_unused) # endif a.cpp:1: syntax error: failed to evaluate #if condition, undefined function-like macro invocation: __has_cpp_attribute( ... ) See https://en.cppreference.c...
Open Graph Description: Encountered while working on #438. # if __has_cpp_attribute(maybe_unused) # endif a.cpp:1: syntax error: failed to evaluate #if condition, undefined function-like macro invocation: __has_cpp_attrib...
X Description: Encountered while working on #438. # if __has_cpp_attribute(maybe_unused) # endif a.cpp:1: syntax error: failed to evaluate #if condition, undefined function-like macro invocation: __has_cpp_attrib...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/534
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"syntax error caused by unconditional `__has_cpp_attribute` usage","articleBody":"Encountered while working on #438.\n\n```cpp\n# if __has_cpp_attribute(maybe_unused)\n# endif\n```\n\n```\na.cpp:1: syntax error: failed to evaluate #if condition, undefined function-like macro invocation: __has_cpp_attribute( ... )\n```\n\nSee\nhttps://en.cppreference.com/w/cpp/feature_test.html#Attributes\nhttps://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fcpp_005fattribute.html","author":{"url":"https://github.com/firewave","@type":"Person","name":"firewave"},"datePublished":"2025-09-07T21:45:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/534/simplecpp/issues/534"}
| 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:520582bd-8147-f0b9-c2b3-8d33bc44dc2f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A29A:B5AA6:6A6F850:94DD060:6A50454C |
| html-safe-nonce | 3cb0a6d635af337733a7ee007fa1f54915bec6f98308be63b6731d473bfabf9e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjlBOkI1QUE2OjZBNkY4NTA6OTRERDA2MDo2QTUwNDU0QyIsInZpc2l0b3JfaWQiOiIyOTY4OTc4NzkzMTk5MzIyNDQ0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e3389e4c34547527b89972de02702835c499f5a199d9a6ad93c8394666e245ff |
| hovercard-subject-tag | issue:3392043061 |
| 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/534/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ed1b8e4e499199f5819b60f8923bb4d14cd601e9b4aba33fbef4cfb7defdf915/cppcheck-opensource/simplecpp/issues/534 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ed1b8e4e499199f5819b60f8923bb4d14cd601e9b4aba33fbef4cfb7defdf915/cppcheck-opensource/simplecpp/issues/534 |
| og:image:alt | Encountered while working on #438. # if __has_cpp_attribute(maybe_unused) # endif a.cpp:1: syntax error: failed to evaluate #if condition, undefined function-like macro invocation: __has_cpp_attrib... |
| 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 | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| 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 | d90666eaf032b7eb8975a378efe38e37f4ebb96c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width