Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » unexpected syntax error from va_arg
unexpected syntax error from va_arg [message #223579] Mon, 15 September 2008 14:27 Go to next message
Eclipse UserFriend
It seems that cdt for ganymede does not like va_arg for a pointer:

void * p;
p = va_arg(ap, void*);

This causes a marker to display on the assignment line. When I hover the
mouse over the marker, all I get is "Syntax error"

The code compiles without error, or warning, so I'm not sure why CDT is
showing a marker on this.

Is there a more appropriate way to pull a pointer from the variable args
list without causing the syntax error marker?

Michael
Re: unexpected syntax error from va_arg [message #223649 is a reply to message #223579] Tue, 16 September 2008 10:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bullet.magnet.example.com

"Michael Giroux" <michael.giroux@bull.com> wrote in
news:gam9fd$ui9$1@build.eclipse.org:

> It seems that cdt for ganymede does not like va_arg for a pointer:
>
> void * p;
> p = va_arg(ap, void*);

It's not just pointers.

unsigned foobar=va_arg(pvar, unsigned);

causes the same thing; I had to turn off the yellow underline :(
(CDT 5.0)

--
Life is complex, with real and imaginary parts.
Re: unexpected syntax error from va_arg [message #233678 is a reply to message #223649] Tue, 05 May 2009 17:13 Go to previous messageGo to next message
Eclipse UserFriend
How do you turn of the yellow underline? I've been wanting to be rid of
that comma/period obscuring feature since I started using Eclipse. Thanks.
Re: unexpected syntax error from va_arg [message #233982 is a reply to message #233678] Thu, 14 May 2009 07:30 Go to previous message
Eclipse UserFriend
Originally posted by: bullet.magnet.example.com

anerbenartzi@yahoo.com (Aner Ben-Artzi) wrote in
news:a0d632528856dfe4024d4eef20b35bac$1@www.eclipse.org:

> How do you turn of the yellow underline? I've been wanting to be rid
> of that comma/period obscuring feature since I started using Eclipse.
> Thanks.
>

General -> Editors -> Text Editors -> Annotations

Select "C++ Indexer Markings" (the '?' on yellow square).
Deselect "Text as" ...

(this took me five minutes to find again)
Previous Topic:Why do I need to manually copy linked libraries?
Next Topic:Webinar: Debugging in CDT - May 26
Goto Forum:
  


Current Time: Tue Sep 23 11:21:24 EDT 2025

Powered by FUDForum. Page generated in 0.03477 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top