René's URL Explorer Experiment


Title: token pasting with "defined" works with gcc (cpp) but not simplecpp · Issue #218 · cppcheck-opensource/simplecpp · GitHub

Open Graph Title: token pasting with "defined" works with gcc (cpp) but not simplecpp · Issue #218 · cppcheck-opensource/simplecpp

X Title: token pasting with "defined" works with gcc (cpp) but not simplecpp · Issue #218 · cppcheck-opensource/simplecpp

Description: Adding this issue originally posted to the cppcheck forum per @danmar 's request. I am using a third-party peripheral library from the manufacturer of the microprocessor that we are using, and it contains a token-pasting macro identical ...

Open Graph Description: Adding this issue originally posted to the cppcheck forum per @danmar 's request. I am using a third-party peripheral library from the manufacturer of the microprocessor that we are using, and it c...

X Description: Adding this issue originally posted to the cppcheck forum per @danmar 's request. I am using a third-party peripheral library from the manufacturer of the microprocessor that we are using, and ...

Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/issues/218

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"token pasting with \"defined\" works with gcc (cpp) but not simplecpp","articleBody":"Adding this issue originally posted to the [cppcheck forum](https://sourceforge.net/p/cppcheck/discussion/development/thread/9f44f31915/) per @danmar 's request.\r\n\r\nI am using a third-party peripheral library from the manufacturer of the microprocessor that we are using, and it contains a token-pasting macro identical to the one labeled \"THIS ONE\" below:\r\n```\r\n#define __FOO__ 1\r\n  \r\n#define IS_DEFINED(name) (defined(__ ## name ## __))  // \u003c--THIS ONE\r\n\r\n#warning Before IS_DEFINED(FOO)\r\n\r\n#if IS_DEFINED(FOO)\r\n#warning Inside IS_DEFINED(FOO)\r\n#endif\r\n\r\n#warning After IS_DEFINED(FOO)\r\n```\r\nWhen I run cpp (Ubuntu v9.3.0) the `IS_DEFINED()` macro works as intended:\r\n```\r\n$ cpp ./test_token_pasting.cpp \r\n# 1 \"./test_token_pasting.cpp\"\r\n# 1 \"\u003cbuilt-in>\"\r\n# 1 \"\u003ccommand-line>\"\r\n# 1 \"/usr/include/stdc-predef.h\" 1 3 4\r\n# 1 \"\u003ccommand-line>\" 2\r\n# 1 \"./test_token_pasting.cpp\"\r\n./test_token_pasting.cpp:5:2: warning: #warning Before IS_DEFINED(FOO) [-Wcpp]\r\n    5 | #warning Before IS_DEFINED(FOO)\r\n      |  ^~~~~~~\r\n./test_token_pasting.cpp:8:2: warning: #warning Inside IS_DEFINED(FOO) [-Wcpp]\r\n    8 | #warning Inside IS_DEFINED(FOO)\r\n      |  ^~~~~~~\r\n./test_token_pasting.cpp:11:2: warning: #warning After IS_DEFINED(FOO) [-Wcpp]\r\n   11 | #warning After IS_DEFINED(FOO)\r\n      |  ^~~~~~~\r\n```\r\nHowever when I run simplecpp:\r\n```\r\n$ ./simplecpp test_token_pasting.cpp\r\n\r\ntest_token_pasting.cpp:5: #warning: #warning Before IS_DEFINED(FOO)\r\ntest_token_pasting.cpp:11: #warning: #warning After IS_DEFINED(FOO)\r\n```\r\n...the `IS_DEFINED()` macro doesn't appear to work. Per @danmar, the specs say this macro results in undefined behavior, but it does seem to work with this version of gcc.","author":{"url":"https://github.com/joe-mclaughlin","@type":"Person","name":"joe-mclaughlin"},"datePublished":"2021-04-28T22:20:19Z","url":"https://github.com/cppcheck-opensource/simplecpp/issues/218"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2c0a60bf-b345-5987-e3cd-8a1cc57dc885
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC92E:19E172:3D33D7:57B323:6AFC5202
html-safe-noncef358797518c10b280e363e6b1b4a368c64fa19122a01d6889827a218f1523c15
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTJFOjE5RTE3MjozRDMzRDc6NTdCMzIzOjZBRkM1MjAyIiwidmlzaXRvcl9pZCI6IjcxODI2NTA4ODM4MDc0MDA0NTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacaabaded8fd26c3a0551a38866ea2adc5f648174493fa2f01081bf1f6301caf3d
hovercard-subject-tagissue:870442599
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cppcheck-opensource/simplecpp/218/issue_layout
twitter:imagehttps://opengraph.githubassets.com/12851036afcb7f31b9ebd16a8ff4fe92966e0905284e521c5687305c1aebc081/cppcheck-opensource/simplecpp/issues/218
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/12851036afcb7f31b9ebd16a8ff4fe92966e0905284e521c5687305c1aebc081/cppcheck-opensource/simplecpp/issues/218
og:image:altAdding this issue originally posted to the cppcheck forum per @danmar 's request. I am using a third-party peripheral library from the manufacturer of the microprocessor that we are using, and it c...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejoe-mclaughlin
hostnamegithub.com
expected-hostnamegithub.com
Noneb63557e0027d8014589e873df28328da74a4356701bb1a9eab49dbf012ba8fa6
turbo-cache-controlno-preview
go-importgithub.com/cppcheck-opensource/simplecpp git https://github.com/cppcheck-opensource/simplecpp.git
octolytics-dimension-user_id278097703
octolytics-dimension-user_logincppcheck-opensource
octolytics-dimension-repository_id33434464
octolytics-dimension-repository_nwocppcheck-opensource/simplecpp
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id33434464
octolytics-dimension-repository_network_root_nwocppcheck-opensource/simplecpp
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0243355b0352c83733a042e0dfb3d75149b51261
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/cppcheck-opensource/simplecpp/issues/218#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fsimplecpp%2Fissues%2F218
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fsimplecpp%2Fissues%2F218
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=cppcheck-opensource%2Fsimplecpp
Reloadhttps://github.com/cppcheck-opensource/simplecpp/issues/218
Reloadhttps://github.com/cppcheck-opensource/simplecpp/issues/218
Reloadhttps://github.com/cppcheck-opensource/simplecpp/issues/218
cppcheck-opensourcehttps://github.com/cppcheck-opensource
simplecpphttps://github.com/cppcheck-opensource/simplecpp
Codehttps://github.com/cppcheck-opensource/simplecpp
Issues86 (86)https://github.com/cppcheck-opensource/simplecpp/issues
Pull requests36 (36)https://github.com/cppcheck-opensource/simplecpp/pulls
Actionshttps://github.com/cppcheck-opensource/simplecpp/actions
Wikihttps://github.com/cppcheck-opensource/simplecpp/wiki
Security and qualityhttps://github.com/cppcheck-opensource/simplecpp/security
Insightshttps://github.com/cppcheck-opensource/simplecpp/pulse
https://github.com/cppcheck-opensource/simplecpp
New issuehttps://github.com/login?return_to=https://github.com/cppcheck-opensource/simplecpp/issues/218
New issuehttps://github.com/login?return_to=https://github.com/cppcheck-opensource/simplecpp/issues/218
token pasting with "defined" works with gcc (cpp) but not simplecpphttps://github.com/cppcheck-opensource/simplecpp/issues/218#top
https://github.com/danmar
bughttps://github.com/cppcheck-opensource/simplecpp/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/joe-mclaughlin
joe-mclaughlinhttps://github.com/joe-mclaughlin
on Apr 28, 2021https://github.com/cppcheck-opensource/simplecpp/issues/218#issue-870442599
cppcheck forumhttps://sourceforge.net/p/cppcheck/discussion/development/thread/9f44f31915/
@danmarhttps://github.com/danmar
@danmarhttps://github.com/danmar
danmarhttps://github.com/danmar
on May 7, 2021https://github.com/cppcheck-opensource/simplecpp/issues/218#event-4701270531
firewavehttps://github.com/firewave
bughttps://github.com/cppcheck-opensource/simplecpp/issues?q=state%3Aopen%20label%3A%22bug%22
on Jul 3, 2025https://github.com/cppcheck-opensource/simplecpp/issues/218#event-18450701119
https://github.com/firewave
firewavehttps://github.com/firewave
on Jul 3, 2025https://github.com/cppcheck-opensource/simplecpp/issues/218#issuecomment-3031896734
#75https://github.com/cppcheck-opensource/simplecpp/issues/75
firewavehttps://github.com/firewave
Problems with ## #269https://github.com/cppcheck-opensource/simplecpp/issues/269
on Jul 3, 2025https://github.com/cppcheck-opensource/simplecpp/issues/218#event-18450801460
Sign up for freehttps://github.com/signup?return_to=https://github.com/cppcheck-opensource/simplecpp/issues/218
Sign in to commenthttps://github.com/login?return_to=https://github.com/cppcheck-opensource/simplecpp/issues/218
danmarhttps://github.com/danmar
bughttps://github.com/cppcheck-opensource/simplecpp/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.