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]

varargs warning on Alpha


Hi.

We have encountered an oddity using GCC 2.95.1 on Alphas running DEC UNIX
4.0a and 4.0d. The symptom looks like this:

In file included from
/usr/local/lib/gcc-lib/alpha-dec-osf4.0a/2.95.1/include/stdarg.h:36,
                 from /home/cree/code/ip/error.h:12,
                 from /home/cree/code/ip/ip.h:12,
                 from comp.c:21:
/usr/local/lib/gcc-lib/alpha-dec-osf4.0a/2.95.1/include/va-alpha.h:36:
warning: redefinition of `va_list'
/usr/local/lib/gcc-lib/alpha-dec-osf4.0a/2.95.1/include/va_list.h:7:
warning: `va_list' previously declared here

Here's a more detailed analysis, courtesy of Michael Cree:

> Looking closely at the two include files:
>
>   /usr/local/lib/gcc-lib/alpha-dec-osf4.0a/2.95.1/include/va-alpha.h
>   /usr/local/lib/gcc-lib/alpha-dec-osf4.0a/2.95.1/include/va_list.h
>
> where va_list.h first loads up va-alpha.h reveals that:
>
> va-alpha.h defines va_list provided that the following tests pass:
>
> #ifndef __GNUC_VA_LIST
> #if !defined(__GNUC_VA_LIST_1) && (defined (_STDARG_H) || defined
>       (_VARARGS_H))
>
> va_list.h then defines va_list provided that the following test passes:
>
> #if !defined(_VA_LIST) && !defined(_HIDDEN_VA_LIST)
>
> Given that the two tests are independent of each other it's no wonder that
> va_list ends up getting typedef'd twice.

Is this a known issue? Is it fixed in 2.95.2?

Thanks for any help.

Lawrence D'Oliveiro


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