Title: Failure when header is included twice with different macros defined · Issue #581 · cppcheck-opensource/simplecpp · GitHub
Open Graph Title: Failure when header is included twice with different macros defined · Issue #581 · cppcheck-opensource/simplecpp
X Title: Failure when header is included twice with different macros defined · Issue #581 · cppcheck-opensource/simplecpp
Description: file1.c: # define Y # include "test.h" # define BBB # include "test.h" test.h: #if defined AAA #elif defined BBB # undef BBB #endif #ifdef BBB # error adf #endif Output: $ ~/simplecpp/simplecpp file.c test.h:8: #error: #error adf
Open Graph Description: file1.c: # define Y # include "test.h" # define BBB # include "test.h" test.h: #if defined AAA #elif defined BBB # undef BBB #endif #ifdef BBB # error adf #endif Output: $ ~/simplecpp/simplecpp fil...
X Description: file1.c: # define Y # include "test.h" # define BBB # include "test.h" test.h: #if defined AAA #elif defined BBB # undef BBB #endif #ifdef BBB # error adf #endif Output: $ ~/sim...
Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/581
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Failure when header is included twice with different macros defined","articleBody":"file1.c:\n```\n# define Y\n# include \"test.h\"\n\n# define BBB\n# include \"test.h\"\n```\n\ntest.h:\n```\n#if defined AAA\n#elif defined BBB\n# undef BBB\n#endif\n\n#ifdef BBB\n# error adf\n#endif\n```\n\nOutput:\n```\n$ ~/simplecpp/simplecpp file.c\ntest.h:8: #error: #error adf\n```\n","author":{"url":"https://github.com/danmar","@type":"Person","name":"danmar"},"datePublished":"2025-11-01T08:17:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/581/simplecpp/issues/581"}
| 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:a639f5f8-0b76-f29c-9588-3694bd94e3a1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A380:79348:FA82AC:1599567:6A4E8F51 |
| html-safe-nonce | daf98ece8c1d4bf1fe5344204c5ec74cd72a73a66bc6b6f59cd51e5a15de99ab |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzgwOjc5MzQ4OkZBODJBQzoxNTk5NTY3OjZBNEU4RjUxIiwidmlzaXRvcl9pZCI6IjUxOTUyMTMxNzA1MzczMDM4ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | eac151d2bc29806406ed658cb42bf2ab868fade5efae91ab238642ff9b51903a |
| hovercard-subject-tag | issue:3577493541 |
| 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/581/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2e7586c7106379f8fc0161b392cfcaf18f6bb73bdf98bc2d3e07e264afa515e8/cppcheck-opensource/simplecpp/issues/581 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2e7586c7106379f8fc0161b392cfcaf18f6bb73bdf98bc2d3e07e264afa515e8/cppcheck-opensource/simplecpp/issues/581 |
| og:image:alt | file1.c: # define Y # include "test.h" # define BBB # include "test.h" test.h: #if defined AAA #elif defined BBB # undef BBB #endif #ifdef BBB # error adf #endif Output: $ ~/simplecpp/simplecpp fil... |
| 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 | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| 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 | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width