René's URL Explorer Experiment


Title: Rescan substituted macro arguments so deferred calls expand like gcc by pfultz2 · Pull Request #713 · cppcheck-opensource/simplecpp · GitHub

Open Graph Title: Rescan substituted macro arguments so deferred calls expand like gcc by pfultz2 · Pull Request #713 · cppcheck-opensource/simplecpp

X Title: Rescan substituted macro arguments so deferred calls expand like gcc by pfultz2 · Pull Request #713 · cppcheck-opensource/simplecpp

Description: A function-like macro name that only becomes a call after its neighbours were substituted was never expanded. This fixes #226. #define EMPTY() #define EVAL(...) __VA_ARGS__ #define HELLO() "Hello World" EVAL ( HELLO EMPTY() () ) simplecpp produced HELLO () where gcc and clang produce "Hello World". The same gap broke the DEFER/OBSTRUCT/EVAL idioms (cloak.h style), so iteration macros like REPEAT and WHILE never terminated correctly. Rescan substituted arguments. After an argument is pre-expanded and substituted into the replacement list, the result is rescanned together with the tokens that follow it, so a name followed by a ( that came from a different argument or from the replacement list is expanded as a call. Model the rescan cursor. A new Token::skippedByRescan flag records that the rescan already passed a function-like name without finding (. A ( produced later by another expansion does not turn it into a call, until the token is substituted into a new replacement list and rescanned again. This keeps EVAL(HELLO DEFER(EMPTY)() ()) at HELLO (), matching gcc. One trailing-call loop. expandTrailingCalls is the only place that expands a trailing macro name, with a parameter-aware lookahead for arguments that come from a parameter. Macro::expand marks its own trailing token when a call expanded to nothing, and the argument pre-expansion clears the flag at the substitution point. The flag sits next to whitespaceahead, so sizeof(Token) is unchanged. Common path unchanged. Arguments without any macro name skip the extra rescan.

Open Graph Description: A function-like macro name that only becomes a call after its neighbours were substituted was never expanded. This fixes #226. #define EMPTY() #define EVAL(...) __VA_ARGS__ #define HELLO() "He...

X Description: A function-like macro name that only becomes a call after its neighbours were substituted was never expanded. This fixes #226. #define EMPTY() #define EVAL(...) __VA_ARGS__ #define HELLO() &quo...

Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/pull/713

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:cc347ba7-68d4-e1a5-7a8d-9e5f904ec5f4
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCDF8:1B76FE:458774:60A1D2:6AFC555E
html-safe-noncec6233fbece36532af8272dda3a9b5d8e629de201fb6ff4386573298b30ff23ce
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREY4OjFCNzZGRTo0NTg3NzQ6NjBBMUQyOjZBRkM1NTVFIiwidmlzaXRvcl9pZCI6IjgzNjA5OTA2Mjc2NDIyMzQyMDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd907efb5d479b6f13be2b0b041e0777a6ecf55cfed92fbf87e52abd90a663ec8
hovercard-subject-tagpull_request:5160640698
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/cppcheck-opensource/simplecpp/pull/713/files
twitter:imagehttps://avatars.githubusercontent.com/u/1306044?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1306044?s=400&v=4
og:image:altA function-like macro name that only becomes a call after its neighbours were substituted was never expanded. This fixes #226. #define EMPTY() #define EVAL(...) __VA_ARGS__ #define HELLO() "He...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb63557e0027d8014589e873df28328da74a4356701bb1a9eab49dbf012ba8fa6
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
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

Links:

Skip to contenthttps://github.com/cppcheck-opensource/simplecpp/pull/713/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fsimplecpp%2Fpull%2F713%2Ffiles
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%2Fpull%2F713%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=cppcheck-opensource%2Fsimplecpp
Reloadhttps://github.com/cppcheck-opensource/simplecpp/pull/713/files
Reloadhttps://github.com/cppcheck-opensource/simplecpp/pull/713/files
Reloadhttps://github.com/cppcheck-opensource/simplecpp/pull/713/files
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
Sign up for GitHub https://github.com/signup?return_to=%2Fcppcheck-opensource%2Fsimplecpp%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcppcheck-opensource%2Fsimplecpp%2Fissues%2Fnew%2Fchoose
danmarhttps://github.com/danmar
cppcheck-opensource:masterhttps://github.com/cppcheck-opensource/simplecpp/tree/master
pfultz2:pp-evalhttps://github.com/pfultz2/simplecpp/tree/pp-eval
Conversation 12 https://github.com/cppcheck-opensource/simplecpp/pull/713
Commits 8 https://github.com/cppcheck-opensource/simplecpp/pull/713/commits
Checks 24 https://github.com/cppcheck-opensource/simplecpp/pull/713/checks
Files changed https://github.com/cppcheck-opensource/simplecpp/pull/713/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/713/files
Rescan substituted macro arguments so deferred calls expand like gcc https://github.com/cppcheck-opensource/simplecpp/pull/713/files#top
Show all changes 8 commits https://github.com/cppcheck-opensource/simplecpp/pull/713/files
0d70b0d Handle eval correctly pfultz2 Nov 3, 2026 https://github.com/cppcheck-opensource/simplecpp/pull/713/commits/0d70b0d02f1e2e1e016c2fafa120834d79ad0767
27ef941 Cleanup pfultz2 Nov 4, 2026 https://github.com/cppcheck-opensource/simplecpp/pull/713/commits/27ef941e455a82d06a3a0c05783ccc6f0c1acfe8
15f01b8 Fix shadow warnings pfultz2 Nov 5, 2026 https://github.com/cppcheck-opensource/simplecpp/pull/713/commits/15f01b82d460f714de0c7aeb44aab31872534f3f
e1fe1ab Merge pfultz2 Nov 6, 2026 https://github.com/cppcheck-opensource/simplecpp/pull/713/commits/e1fe1ab0612554b5c7c9235ac6248c708eb815ea
05d017c Fix another test case pfultz2 Nov 8, 2026 https://github.com/cppcheck-opensource/simplecpp/pull/713/commits/05d017cc280288e7d244dfd099f7b28838458489
08c7c43 Fix nesting pfultz2 Nov 8, 2026 https://github.com/cppcheck-opensource/simplecpp/pull/713/commits/08c7c439b4afc09f43a82593614de35a9a7676ae
8ea6017 Fix wrong macro set in lookahead pfultz2 Nov 9, 2026 https://github.com/cppcheck-opensource/simplecpp/pull/713/commits/8ea6017f3646f1a81b886f1d3fdbaee55a37a18b
cd9cdef Fix issue with pasting pfultz2 Nov 17, 2026 https://github.com/cppcheck-opensource/simplecpp/pull/713/commits/cd9cdefce74532f75ea5a4bb100daa866f06f633
Clear filters https://github.com/cppcheck-opensource/simplecpp/pull/713/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/713/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/713/files
run-tests.py https://github.com/cppcheck-opensource/simplecpp/pull/713/files#diff-55af8247ec95043557b9810df657aade6cf363e20e83a29ed961b4f1f00ccb7a
simplecpp.cpp https://github.com/cppcheck-opensource/simplecpp/pull/713/files#diff-c847846a0c414ac05f52e4f9686648f22c76c9bb152579a253b600223c202832
simplecpp.h https://github.com/cppcheck-opensource/simplecpp/pull/713/files#diff-8feef6892144dbe750ffc83a1525c796968b56cd4d6500fe8bf22bac61cf9174
test.cpp https://github.com/cppcheck-opensource/simplecpp/pull/713/files#diff-042cc0321bd0d3c8cb8262c89142b3e6aba34345ae77b4294f5e07dd2687ffcf
run-tests.pyhttps://github.com/cppcheck-opensource/simplecpp/pull/713/files#diff-55af8247ec95043557b9810df657aade6cf363e20e83a29ed961b4f1f00ccb7a
View file https://github.com/pfultz2/simplecpp/blob/cd9cdefce74532f75ea5a4bb100daa866f06f633/run-tests.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/simplecpp/pull/713/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/simplecpp/pull/713/files#diff-55af8247ec95043557b9810df657aade6cf363e20e83a29ed961b4f1f00ccb7a
https://github.com/cppcheck-opensource/simplecpp/pull/713/files#diff-55af8247ec95043557b9810df657aade6cf363e20e83a29ed961b4f1f00ccb7a
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/713/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/713/files
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.