This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Compiler warnings while compiling gcc with clangâ


On Tue, May 05, 2015 at 04:42:02AM +0000, Aditya K 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]

as discussed those particular warnings are pretty useless.  However some
of the other warnings such as the NULL to bool conversion and unused
function ones seem like they might be worth looking into.  If you
determin warnings make sense to fix it'd be nice to change gcc to warn
too.

I'm not sure why, but the list of warnings is really garbled which makes
it hard to read.

Trev

> 
> Thanks,
> -Aditya 		 	   		  




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