Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variadic macros cause problems with cpphs #16

Open
mithrandi opened this issue Apr 11, 2015 · 1 comment
Open

Variadic macros cause problems with cpphs #16

mithrandi opened this issue Apr 11, 2015 · 1 comment

Comments

@mithrandi
Copy link

It seems that the variadic macros used in some of the shims cause... issues... with cpphs. Demonstration of the problem:

mithrandi@verdant /tmp> cpphs --cpp -P -C foo -o bar
mithrandi@verdant /tmp> cat foo
#define FOO(args...) f(args)
FOO(1)
FOO(1, 2)
FOO(1, 2, 3)
mithrandi@verdant /tmp> cat bar

FOO(1)
f(1)
FOO(1, 2, 3)

The good news is that there seem to be very few invocations of these macros that actually pass multiple arguments, so I think it should be fairly easy to make these macros non-variadic, which would avoid the problem. Would this be a reasonable solution?

@luite
Copy link
Member

luite commented Apr 11, 2015

yes, i'll do this in improved-base

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants