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

Bug#97603: can't compile with define gnu_source on alpha with stdio and curses



Hello!

>From stdio.h:
#include <libio.h>

#ifdef __USE_XOPEN
# ifdef __GNUC__
#  ifndef _VA_LIST_DEFINED
typedef _G_va_list va_list;
#   define _VA_LIST_DEFINED
#  endif
# else
#  include <stdarg.h>
# endif
#endif

>From /usr/lib/gcc-lib/alpha-linux/2.95.4/include (on lully):
#define __GNUC_VA_LIST_1

#define _VA_LIST
#define _VA_LIST_

typedef __gnuc_va_list va_list;

And here is the problem. From the stdio declaration seems, that if somebody
define a va_list type, it should declare the _VA_LIST_DEFINED constant,
since it is used to determine if we can declare the va_list without
a redeclaration. 

Please make the _VA_LIST_DEFINED frame to this declaration, because it
prevent bombardier to compile warning less, and it is why it can't go
to woody, because of the alpha platform. If you can't fix or won't
fix the bug in 2 week, I will remove the alpha arch from the bombardier
Architectures.

Thanks,
RISKO Gergely


On Sat, May 19, 2001 at 12:40:18PM -0700, Daniel Jacobowitz wrote:
> On Tue, May 15, 2001 at 09:49:36PM +0200, RISKO Gergely wrote:
> > Package: gcc
> > Version: 1:2.95.3-7
> > 
> > risko@lully:~$ gcc -Wall -Werror -O2 probe.c
> > cc1: warnings being treated as errors
> > In file included from /usr/lib/gcc-lib/alpha-linux/2.95.4/include/stdarg.h:36,
> >                  from /usr/include/curses.h:80,
> > 		                  from probe.c:3:
> > 		 /usr/lib/gcc-lib/alpha-linux/2.95.4/include/va-alpha.h:36: warning: redefinition of `va_list'
> > 		/usr/include/stdio.h:69: warning: `va_list' previously declared here
> > 
> > The code is:
> > #define _GNU_SOURCE
> > #include <stdio.h>
> > #include <curses.h>
> > 
> > int main()
> > {
> >     return 0;
> >     }
> 
> >From stdio.h:
> 
> #ifdef __USE_XOPEN
> # ifdef __GNUC__
> #  ifndef _VA_LIST_DEFINED
> typedef _G_va_list va_list;
> #   define _VA_LIST_DEFINED
> #  endif
> # else
> #  include <stdarg.h>
> # endif
> #endif
> 
> That doesn't make a whole lot of sense to me...  _G_config.h and
> libio.h go to great lengths to get _G_va_list right, but
> unconditionally typedefing va_list is bound to break.  _VA_LIST_DEFINED
> gets set only in this place.
> 
> -- 
> Daniel Jacobowitz                           Debian GNU/Linux Developer
> Monta Vista Software                              Debian Security Team




Reply to: