René's URL Explorer Experiment


Title: Fix: simplecpp ## fails to expand function-like macro when '(' is not adjacent by paulafy6 · Pull Request #655 · cppcheck-opensource/simplecpp · GitHub

Open Graph Title: Fix: simplecpp ## fails to expand function-like macro when '(' is not adjacent by paulafy6 · Pull Request #655 · cppcheck-opensource/simplecpp

X Title: Fix: simplecpp ## fails to expand function-like macro when '(' is not adjacent by paulafy6 · Pull Request #655 · cppcheck-opensource/simplecpp

Description: When the ## operator concatenates two tokens to form a function-like macro name (e.g. PREFIX_ ## kind → PREFIX_SCALAR), simplecpp looked for the argument list '(...)' only at B->next. In PAR-style indirection patterns the '(' is separated from B by a comma or a variadic parameter token: #define PAR(a, ...) a __VA_ARGS__ #define PREFIX_SCALAR(T, N) T N #define DISPATCH(kind, ...) PAR(PREFIX_ ## kind, (__VA_ARGS__)) DISPATCH(SCALAR, int, x) // was: [unknownMacro] — now: int x Because '(' was not found, expansion was aborted and the macro was reported as unknownMacro, causing cppcheck to skip the entire translation unit. Fix: when B->next is not '(' and we are in the appendTokens context (expandResult==false), walk forward on the same line skipping ',' separators and resolving named parameter tokens via expandArg(). The first '(' found (literally or as the head of an expanded argument) is used as lpar and passed to appendTokens() as before. The forwardScan flag ensures expandToken() is called on the result even when expandResult is false. The forward scan is restricted to expandResult==false to avoid unintended side-effects in the main expansion loop.

Open Graph Description: When the ## operator concatenates two tokens to form a function-like macro name (e.g. PREFIX_ ## kind → PREFIX_SCALAR), simplecpp looked for the argument list '(...)' only at B->next. In...

X Description: When the ## operator concatenates two tokens to form a function-like macro name (e.g. PREFIX_ ## kind → PREFIX_SCALAR), simplecpp looked for the argument list '(...)' only at B-&...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f251edd9-c9d7-f78d-c877-48968aa3e536
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB7D8:13C54:3CCB966:562AF11:6A4FAAA0
html-safe-nonce58a3b3d409d09ffbb9c3687c2b18e7d74e249625ae9f3805cbb200e201ceb3d7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0Q4OjEzQzU0OjNDQ0I5NjY6NTYyQUYxMTo2QTRGQUFBMCIsInZpc2l0b3JfaWQiOiI4NTUzMDA4MzQxODczMzA2MjcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac4cfd7026e36be4244a78fc40505ce7aca8178c44d80e18ab782f6026a02a879d
hovercard-subject-tagpull_request:3753122898
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/655/files
twitter:imagehttps://avatars.githubusercontent.com/u/63363980?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/63363980?s=400&v=4
og:image:altWhen the ## operator concatenates two tokens to form a function-like macro name (e.g. PREFIX_ ## kind → PREFIX_SCALAR), simplecpp looked for the argument list '(...)' only at B->next. In...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
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
release4b249b445842943ed31549e027f57a8ade9881ed
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/cppcheck-opensource/simplecpp/pull/655/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fsimplecpp%2Fpull%2F655%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fsimplecpp%2Fpull%2F655%2Ffiles
Sign up https://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/655/files
Reloadhttps://github.com/cppcheck-opensource/simplecpp/pull/655/files
Reloadhttps://github.com/cppcheck-opensource/simplecpp/pull/655/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/655/files
cppcheck-opensource https://github.com/cppcheck-opensource
simplecpphttps://github.com/cppcheck-opensource/simplecpp
Notifications https://github.com/login?return_to=%2Fcppcheck-opensource%2Fsimplecpp
Fork 104 https://github.com/login?return_to=%2Fcppcheck-opensource%2Fsimplecpp
Star 263 https://github.com/login?return_to=%2Fcppcheck-opensource%2Fsimplecpp
Code https://github.com/cppcheck-opensource/simplecpp
Issues 82 https://github.com/cppcheck-opensource/simplecpp/issues
Pull requests 31 https://github.com/cppcheck-opensource/simplecpp/pulls
Actions https://github.com/cppcheck-opensource/simplecpp/actions
Wiki https://github.com/cppcheck-opensource/simplecpp/wiki
Security and quality 0 https://github.com/cppcheck-opensource/simplecpp/security
Insights https://github.com/cppcheck-opensource/simplecpp/pulse
Code https://github.com/cppcheck-opensource/simplecpp
Issues https://github.com/cppcheck-opensource/simplecpp/issues
Pull requests https://github.com/cppcheck-opensource/simplecpp/pulls
Actions https://github.com/cppcheck-opensource/simplecpp/actions
Wiki https://github.com/cppcheck-opensource/simplecpp/wiki
Security and quality https://github.com/cppcheck-opensource/simplecpp/security
Insights https://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
paulafy6https://github.com/paulafy6
cppcheck-opensource:masterhttps://github.com/cppcheck-opensource/simplecpp/tree/master
paulafy6:fix-preprocessor-concathttps://github.com/paulafy6/simplecpp/tree/fix-preprocessor-concat
Conversation 4 https://github.com/cppcheck-opensource/simplecpp/pull/655
Commits 2 https://github.com/cppcheck-opensource/simplecpp/pull/655/commits
Checks 25 https://github.com/cppcheck-opensource/simplecpp/pull/655/checks
Files changed https://github.com/cppcheck-opensource/simplecpp/pull/655/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/655/files
Fix: simplecpp ## fails to expand function-like macro when '(' is not adjacent https://github.com/cppcheck-opensource/simplecpp/pull/655/files#top
Show all changes 2 commits https://github.com/cppcheck-opensource/simplecpp/pull/655/files
38ab4d2 Fix: simplecpp ## fails to expand function-like macro when '(' is not… May 26, 2026 https://github.com/cppcheck-opensource/simplecpp/pull/655/commits/38ab4d2db692529ea4192f491592ea4e07a144c2
ffb123e test: add regression test for ## PAR-style indirection (hashhash_func… May 28, 2026 https://github.com/cppcheck-opensource/simplecpp/pull/655/commits/ffb123e4835bbf9cb1bbce551b56e39fa5e74474
Clear filters https://github.com/cppcheck-opensource/simplecpp/pull/655/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/655/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/655/files
simplecpp.cpp https://github.com/cppcheck-opensource/simplecpp/pull/655/files#diff-c847846a0c414ac05f52e4f9686648f22c76c9bb152579a253b600223c202832
test.cpp https://github.com/cppcheck-opensource/simplecpp/pull/655/files#diff-042cc0321bd0d3c8cb8262c89142b3e6aba34345ae77b4294f5e07dd2687ffcf
simplecpp.cpphttps://github.com/cppcheck-opensource/simplecpp/pull/655/files#diff-c847846a0c414ac05f52e4f9686648f22c76c9bb152579a253b600223c202832
View file https://github.com/cppcheck-opensource/simplecpp/blob/ffb123e4835bbf9cb1bbce551b56e39fa5e74474/simplecpp.cpp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/simplecpp/pull/655/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/simplecpp/pull/655/files#diff-c847846a0c414ac05f52e4f9686648f22c76c9bb152579a253b600223c202832
danmarhttps://github.com/danmar
Jun 2, 2026https://github.com/cppcheck-opensource/simplecpp/pull/655/files#r3340242551
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/655/files
danmarhttps://github.com/danmar
Jun 2, 2026https://github.com/cppcheck-opensource/simplecpp/pull/655/files#r3340238178
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/655/files
https://github.com/cppcheck-opensource/simplecpp/pull/655/files#diff-c847846a0c414ac05f52e4f9686648f22c76c9bb152579a253b600223c202832
test.cpphttps://github.com/cppcheck-opensource/simplecpp/pull/655/files#diff-042cc0321bd0d3c8cb8262c89142b3e6aba34345ae77b4294f5e07dd2687ffcf
View file https://github.com/cppcheck-opensource/simplecpp/blob/ffb123e4835bbf9cb1bbce551b56e39fa5e74474/test.cpp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/simplecpp/pull/655/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/simplecpp/pull/655/files#diff-042cc0321bd0d3c8cb8262c89142b3e6aba34345ae77b4294f5e07dd2687ffcf
https://github.com/cppcheck-opensource/simplecpp/pull/655/files#diff-042cc0321bd0d3c8cb8262c89142b3e6aba34345ae77b4294f5e07dd2687ffcf
https://github.com/cppcheck-opensource/simplecpp/pull/655/files#diff-042cc0321bd0d3c8cb8262c89142b3e6aba34345ae77b4294f5e07dd2687ffcf
https://github.com/cppcheck-opensource/simplecpp/pull/655/files#diff-042cc0321bd0d3c8cb8262c89142b3e6aba34345ae77b4294f5e07dd2687ffcf
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/655/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.