This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/77410] macro reference supplied as macro reference argument is not expanded
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Aug 2016 03:43:53 +0000
- Subject: [Bug preprocessor/77410] macro reference supplied as macro reference argument is not expanded
- Auto-submitted: auto-generated
- References: <bug-77410-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77410
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is correct because the token that gets expanded is MDNMx and not MDNM.
When you have:
#define MDNM utl1
#define m1(mdnm) mdnm##x
#define m2(mdnm) m1(mdnm)
m2(MDNM)
first m2 gets expanded to m1(mdnm) and then m1(MDNM) gets expanded including
the argument.