Logo
Explore Help
Register Sign In
OpenHarmony/third_party_mesa3d
2
0
Fork 0
You've already forked third_party_mesa3d
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
660bda057a0f9c83625e798c0f719080d11e9431
third_party_mesa3d/tests/032-define-func-self-recurse.c

3 lines
35 B
C
Raw Normal View History

Fix bug (and add tests) for a function-like macro defined as itself. This case worked previously, but broke in the recent rewrite of function- like macro expansion. The recursion was still terminated correctly, but any parenthesized expression after the macro name was still being swallowed even though the identifier was not being expanded as a macro. The fix is to notice earlier that the identifier is an already-expanding macro. We let the lexer know this through the classify_token function so that an already-expanding macro is lexed as an identifier, not a FUNC_MACRO.
2010-05-19 07:29:22 -07:00
#define foo(a) foo(2 * (a))
foo(3)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 49ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API