Re: va_list *



On Mon, 28 Jul 2008, Ryan Lortie wrote:

ISO C99 (footnote 215, §7.15) says that this program is valid and should
print out 1, 2, 3...

Note that GLib can currently *not* rely on C99 features.
That's a pity, but "no" is the oucome of our last discussion
on this topic:
  http://mail.gnome.org/archives/gtk-devel-list/2006-January/msg00057.html

""
 Collects a variable argument value from a va_list. We have to
 implement the varargs collection as a macro, because on some systems
 va_list variables cannot be passed by reference.
""

AFAIR, this was at least the case on systems that implemented va_list
with an array type.

Can anyone please weigh in on whether or not these "some systems" have
gotten their act together yet?  Is it still necessary to go out of our
way like this in glib?

I think it's best to simply switch to C99 at *some* point (e.g. next year?
2009 - C99 will be ten years old by then). At that point we *know* we can rely
on features like va_list pointers. Before that, people are not forced to
upgrade compilers, so there'll always be an ancient setup/system that breaks
for new feature uses.

Thanks in advance.

Cheers

---
ciaoTJ


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]