This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: va_arg *, and why not.


Mark Mitchell <mark@codesourcery.com> writes:

| >>>>> "Gabriel" == Gabriel Dos Reis <gdr@codesourcery.com> writes:
| 
|     Gabriel> Hmm, I'm confused there.  I was under the impression that
|     Gabriel> it was taking the address of a va_list function argument
|     Gabriel> that was not portable.  Furthermore, in his proposed
|     Gabriel> resolution using va_copy was one option.
| 
| But with the caveat that there be a libiberty/system.h equivalent to
| handle systems that do not define va_copy.

Aha, got it.

So what about changing the prototype of report_diagnostic() to

  void report_diagnostic (const char *, va_list *, const char *, int, int)

?

That would solve the need for va_copy.

-- Gaby
CodeSourcery, LLC                             http://www.codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]