First off - this question is too hard for my brain...

> the variadic (sp?) 

That's how I'd spell it. Doesn't mean it's right though.



> Could this just be a throw-back from back in the day when gcc 
> didn't produce 
> this error because it couldn't figure out what the true last 
> parameter was?

I suspect it's more the other way round: That is, gcc (any compiler)
probably always knew what the last named parameter was, as it is the
last one with a symbol name and a type associated with it, so surely
must appear in the parsing...

So I guess what has happened is that, in an effort to make the compiler
more "standards compliant" they have added logic to detect and complain
about the case where the parameter passed to va_start() is *not* the
last named parameter.

The description of va_start() seems to indicate that the second
parameter should be the "the name of the last parameter before the
variable argument list, i.e., the last parameter of which the calling
function knows the type."

That's may guess, anyway; it is detecting a "violation" of the
definition of va_start(), even though the compiler is perfectly capably
of figuring out what you really meant, and could easily "Do the Right
Thing" without you giving it that clue anyway - the compiler can surely
find the variable part of the passed parameter list, without you
pointing at the "last" variable before it, I would have thought.

In the short term, you can presumably switch the order of the parameters
"const char *fmt, const char *title", and all will be well?


-- 
Ian


SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to