Bug 10666

Summary: undefined ATTRIBUTE_NULL_PRINTF_3
Product: gcc Reporter: benoit.sibaud
Component: bootstrapAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED INVALID    
Severity: normal CC: bryceman, dale, dmeranda, eet, gcc-bugs
Priority: P3 Keywords: build, documentation
Version: 3.3   
Target Milestone: ---   
Host: sparc-sun-solaris2.6 Target: sparc-sun-solaris2.6
Build: sparc-sun-solaris2.6 Known to work:
Known to fail: Last reconfirmed: 2003-05-26 14:30:33
Attachments: dwarf2asm.out.bz2

Description benoit.sibaud 2003-05-07 16:16:00 UTC
I got the same error as Gabriel Dos Reis (cf http://gcc.gnu.org/ml/gcc-bugs/2003-03/msg01081.html ) about "ATTRIBUTE_NULL_PRINTF_3" with pre-release snapshot gcc-3.3-20030506, on four platforms (sparc-sun-solaris2.6, 2.7, 2.8 and i686-pc-linux-gnu).

8<------------------------------
make[3]: Leaving directory `/opt/build_shop/build-gcc-3.3-20030506-sparc-sun-solaris2.6/gcc/intl'
gcc -c   -g  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long   -DHAVE_CONFIG_H -I/export/shop/stow/binutils-2.13.1/include -I/export/shop/stow/binutils-2.13.1/sparc-sun-solaris2.6/include    -I. -I. -I../../gcc-3.3-20030506/gcc -I../../gcc-3.3-20030506/gcc/. -I../../gcc-3.3-20030506/gcc/config -I../../gcc-3.3-20030506/gcc/../include ../../gcc-3.3-20030506/gcc/dwarf2asm.c -o dwarf2asm.o
In file included from ../../gcc-3.3-20030506/gcc/dwarf2asm.c:29:
../../gcc-3.3-20030506/gcc/dwarf2asm.h:26: parse error before "ATTRIBUTE_NULL_PRINTF_3"
../../gcc-3.3-20030506/gcc/dwarf2asm.h:26: warning: type defaults to `int' in declaration of `ATTRIBUTE_NULL_PRINTF_3'
[SNIP]
8<------------------------------

Variables explanations
SHOP_STOW:     top level GNU stow directoy
SHOP_PACKAGE:  gcc-3.3-20030506
SHOP_CONFIG:   config.guess triplet
SRC_DIR:       ${TOP_DIR}/build_shop/gcc-3.3-20030506
SHOP_BINUTILS: binutils-2.13.1
BUILD_DIR: ${TOP_DIR}/build_shop/build-gcc-3.3-20030506-${SHOP_CONFIG}
MULTILIB:  --enable-multilib or --disable-multilib depending from arch

Configure part:

    ${SRC_DIR}/configure \
    --prefix=${SHOP_STOW}/${SHOP_PACKAGE}/${SHOP_CONFIG}  \
    --infodir=${SHOP_STOW}/${SHOP_PACKAGE}/info \
    --mandir=${SHOP_STOW}/${SHOP_PACKAGE}/man \
    --datadir=${SHOP_STOW}/${SHOP_PACKAGE}/share \
    --enable-threads=posix \
    --enable-long-long \
    --enable-namespaces \
    ${MULTILIB} \
    --with-as=${SHOP_STOW}/${SHOP_BINUTILS}/${SHOP_CONFIG}/bin/as \
    --with-ld=${SHOP_STOW}/${SHOP_BINUTILS}/${SHOP_CONFIG}/bin/ld \
    --enable-nls \
    --with-included-gettext
    cd ${SRC_DIR}/gcc/ada
    touch treeprs.ads [es]info.h nmake.ad[bs]

Followed by a make bootstrap in $BUILD_DIR

Preprocessor output (cf attached file):
8<--------------------------------------
extern void dw2_asm_output_data (int, unsigned int, const char *, ...)

     ATTRIBUTE_NULL_PRINTF_3;
8<--------------------------------------

Release:
gcc-3.3-20030506

Environment:
i686-pc-linux-gnu, sparc-sun-solaris2.6, sparc-sun-solaris2.7, sparc-sun-solaris2.8
Comment 1 eet 2003-05-12 11:07:46 UTC
From: =?ISO-8859-1?Q?Beno=EEt_SIBAUD?=
 <benoit.sibaud@rd.francetelecom.com>
To: gcc-prs@gcc.gnu.org,  gcc-bugs@gcc.gnu.org,  gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: bootstrap/10666: undefined ATTRIBUTE_NULL_PRINTF_3
Date: Mon, 12 May 2003 11:07:46 +0200

 Hi,
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10666
 
 just to let you know the problem is still present with the new 3.3 
 snapshot gcc-3.3-20030508 (tested on i686-pc-linux-gnu, sun-solaris2.6 
 and sun-solaris2.8).
 
 -- 
 Benoît Sibaud
 

Comment 2 eet 2003-05-16 13:37:26 UTC
From: =?ISO-8859-1?Q?Beno=EEt_SIBAUD?=
 <benoit.sibaud@rd.francetelecom.com>
To: =?ISO-8859-1?Q?Beno=EEt_SIBAUD?= <benoit.sibaud@rd.francetelecom.com>
Cc: gcc-prs@gcc.gnu.org,  gcc-bugs@gcc.gnu.org,  gcc-gnats@gcc.gnu.org
Subject: Re: bootstrap/10666: undefined ATTRIBUTE_NULL_PRINTF_3
Date: Fri, 16 May 2003 13:37:26 +0200

 Hi,
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10666 
 
 
 > just to let you know the problem is still present with the new 3.3 
 > snapshot gcc-3.3-20030508 (tested on i686-pc-linux-gnu, sun-solaris2.6 
 > and sun-solaris2.8).
 
 Same problem with gcc-3.3.
 
 binutils-2.13.1/include/ansidecl.h was included, not 
 gcc-3.3/include/ansidecl.h.
 
 Successful bootstrap on i686-pc-linux-gnu, in progress for 
 sparc-sun-solaris2.6|7|8.
 
 -- 
 Benoît Sibaud
 

Comment 3 dmeranda 2003-05-17 04:49:13 UTC
From: Deron Meranda <dmeranda@iac.net>
To: gcc-prs@gcc.gnu.org, benoit.sibaud@rd.francetelecom.com,
   gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: bootstrap/10666: undefined ATTRIBUTE_NULL_PRINTF_3
Date: Sat, 17 May 2003 04:49:13 -0400

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10666
 
 Also seen under hppa2.0-hp-hpux11.00 (32-bit) with
 gcc 3.3 final release.   Using binutils 2.13.2.1.
 
 As mentioned, it is picking up the ansidecl.h under binutils
 rather than gcc/include.  Since the only diffs seem to be
 these ATTRIBUTE_ macros, you can temporarily work around the
 bootstrap problem by replacing the ansidecl.h header in
 binutils with the one from gcc 3.3.  This is obviously not a
 correct fix, but will allow the stage1 compiler to be built.
 
 For the record, here's the compile line in my setup which
 ends up including the wrong ansidecl.h...
 
 /usr/bin/cc -Ae -z +ESlit +DA2.0 \
     -I/opt/gnu/binutils/2.13.2.1-32/include \
     +Z -c   -g  -DIN_GCC     -DHAVE_CONFIG_H \
     -I. -I. -I/opt2/gnu/src/gcc/gcc-3.3/gcc \
     -I/opt2/gnu/src/gcc/gcc-3.3/gcc/. \
     -I/opt2/gnu/src/gcc/gcc-3.3/gcc/config \
     -I/opt2/gnu/src/gcc/gcc-3.3/gcc/../include \
     /opt2/gnu/src/gcc/gcc-3.3/gcc/dwarf2asm.c \
     -o dwarf2asm.o
 
 The first -I directory was a direct result of me specifying
 it in $CC/$CFLAGS during the configure phase (needed because I
 have many different compilers and several different binutils
 versions on the system).  So this may be "user error" on my
 part.  But it seems like an easy error to make, so it may be
 worth a mention in the install notes until binutils catches
 up with gcc.
Comment 4 Andrew Pinski 2003-05-26 14:30:33 UTC
A possiable fix is to add ATTRIBUTE_NULL_PRINTF_3 to binutils's ansidecl.h.
Comment 5 Andrew Pinski 2003-05-28 12:39:46 UTC
*** Bug 11010 has been marked as a duplicate of this bug. ***
Comment 6 Dara Hazeghi 2003-06-08 03:55:10 UTC
Andrew, do you know the binutils and gcc ansidecl.h are supposed to be the same. If so, maybe 
binutils (or gcc) just needs to do a merge?
Comment 7 Andrew Pinski 2003-06-08 04:37:45 UTC
Actually in the cvs version of binutils they are the same so the problem is that when you use a 
released version of binutils that was released before gcc, you might get a different version than 
what is in gcc.
Comment 8 Andrew Pinski 2003-06-30 14:27:06 UTC
*** Bug 11255 has been marked as a duplicate of this bug. ***
Comment 9 Andrew Pinski 2003-07-01 19:41:51 UTC
The only thing I can say is that is really a documentation problem with gcc that should 
say which version of binutils is supported in the combined build but I do not even though 
if the combined build is even documented.
Comment 10 Andrew Pinski 2003-09-01 04:57:08 UTC
Since the only place where combined builds are documented is the cross docs, it usually 
reasonable that you should be using a new binutils with a new GCC so closing this as 
invalid.