[Qt-creator] Parser bug + suggestion

Roberto Raggi roberto.raggi at trolltech.com
Fri Jan 9 18:31:14 CET 2009


On Jan 9, 2009, at 6:22 PM, Frank Neuhaus wrote:

> Hi,
>
> first I'd like to report a bug in the C++ parser (that is  
> responsible for underlining erroneous code):
> Consider this code:
>
> #define LogInfo(msg, ...) printf(msg, ## __VA_ARGS__)

Well, it's not really a bug, it's just that we don't yet support C99.  
For example, try this with

[roberto at macbook arg]$ cat arg.cpp
#include <cstdio>
#define debug(format, ...) fprintf (stderr, format, __VA_ARGS__)
int main() { debug("%s", "ciao"); }

[roberto at macbook arg]$ g++ -xc++ -ansi -pedantic arg.cpp
arg.cpp:2:23: warning: anonymous variadic macros were introduced in C99


By the way, we will try to implement more gcc/msvc extensions and c99  
features as soon as possible.

ciao robe




More information about the Qt-creator-old mailing list