Summary: | parser has problems with variadic macros | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Armin Berres <armin> |
Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | ashaduri, olivier.jg |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Unspecified | ||
Latest Commit: | Version Fixed In: |
Description
Armin Berres
2009-07-15 12:35:38 UTC
Same problem here, a simple testcase to demonstrate: #include <cstdio> #define debug_print(format, ...) \ std::printf(format, ##__VA_ARGS__); void f() { debug_print("hello %s", "world"); // the yellow squiggle appears under ')' } Removing ## above removes the squiggle too. GCC documentation: http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html#Variadic-Macros Fixed. I still don't think this is implemented correctly - even though the squiggly underlines are gone now. Just look at the context browser tooltip when hovering the macro use, it still contains __VA_ARGS__ in it's "preprocessed contents" part. The variadic works ok, so that makes this a va_args issue dupe. *** This bug has been marked as a duplicate of bug 223596 *** Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively |