This is the mail archive of the
mailing list for the GCC project.
Re: Compiler warnings while compiling gcc with clangâ
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Aditya K <hiraditya at msn dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 4 May 2015 21:58:54 -0700
- Subject: Re: Compiler warnings while compiling gcc with clangâ
- Authentication-results: sourceware.org; auth=none
- References: <BLU179-W15F1B75976EAA6915DFE1BB6D10 at phx dot gbl>
On Mon, May 4, 2015 at 9:42 PM, Aditya K <firstname.lastname@example.org> wrote:
> I was able to successfully bootstrap gcc by using clang as the stage 1 compiler. I configured gcc using the following arguments.
> ../configure --disable-multilib --enable-bootstrap --enable-languages=c,c++ CC=/work/llvm/install-release/bin/clang CXX=/work/llvm/install-release/bin/clang++
> And the bootstrap was successful. One useful thing I got to see was clang warnings. Clang produced several warnings (> 1000 unique ones). I have attached two files with this email.
> 1. sorted list of warnings (summary only)
> 2. complete build log.
> I want to know that is there any interest in resolving these warnings? I went through the list a little bit and some warnings
> appear to be quite useful. e.g.
> 1. warning: struct 'varpool_node' was previously declared as a class [-Wmismatched-tags]
> 2. ../../gcc/cgraph.h../../gcc/wide-int.h::18881125::101:: warningwarning: : class 'cgraph_node' was previously declared as a struct [-Wmismatch ed-tags]'fixed_wide_int_storage' defined as a class template here but previously declared as a struct template [-Wmismatched-tags]
These two are bogus and really clang in GCC's mind. The main reason
is the standard says struct and class are the same thing. We are not
going to fix these kind of issues in GCC sources since they don't