Version: Luna SR2 (4.4.2), Build id: M20150204-1700

Actually, everything in the pictures.

Eclipse / cdt

Eclipse / cdt

Wherein:

  1. Building the project takes place without a single error, that is, it is a bug of the Eclipse parser.
  2. In other places of the code, it has no comments on va_arg and other va_* .

What I have not tried, even turned off all the validators in the C / C ++ settings, does not help.

Is it possible to overcome?

  • Try to download the latest version of eclipse and see if it will work in it. If not, try resetting the settings. - user26699
  • This is the latest :) Now I'll check one more thing. - user6550
  • Right now I give the option to answer. - user6550

1 answer 1

For some reason he does not like the asterisk. Neither:

 va_arg( ap, char * ); 

Not like this (assuming that it is incorrectly trying to open a macro because of a space):

 va_arg( ap, char* ); 

The following trick helps:

 typedef char * pchar; va_arg( ap, pchar ); 

It would seem ... But no, and with other types of buggy! The decision was about the same:

Eclipse / cdt

It became:

Eclipse / cdt

  • Looks like he doesn't eat keywords there. - Qwertiy
  • Yeah. And taypdefy and variables - it is normal. Suddenly ... - user6550
  • typedef is just a name. Yes, the type name. But a name. And char and unsigned are the keywords of the language. - Qwertiy
  • So what he parsit something? If the compiler / preprocessor that are involved in the environment, everything is digested normally. Yes, and in ман va_arg explicitly stated that the second argument is a type, and about the asterisk, too, everything is clearly painted. I thought that it is set in the settings of the c / c ++ validators. But if there everything is turned off and cut down cppcheck, it still turns red. - user6550