[gccsdk] GCC 4.7.4 errors

alan buckley alan_baa at hotmail.com
Mon Nov 30 12:01:30 PST 2015


Lee Noar wrote on Mon, 30 Nov 2015 17:32:31 +0000
> Subject: Re: [gccsdk] GCC 4.7.4 errors
> 
> On 30/11/15 16:19, Gavin Wraith wrote:
> > In message <565C58D2.4020703 at sky.com>
> >            Lee Noar <leenoar at sky.com> wrote:
> >
> >> The above symbols relate to C++ exceptions and are provided by
> >> libstdc++. If you link with g++, then these should be resolved.
> >
> >> That's all C++ stuff, are you sure they haven't switched to C++?
> >> Or is it still using g++ to compile lapi.c when it should be
> >> using gcc? Did you figure that one out?
> >
> > No.
> >
> > I don't know why GCC thinks it is encountering C++. I wanted
> > it to compile as C. I was surprised to see those output lines
> > beginning with g++ and not gcc. As far as I can see the sources
> > v5.3.1 (which compiled successfully as C) and v5.3.2 are
> > just pure C. Because it keeps compiling with g++ and not
> > gcc I wonder if there may be some system variable that
> > sets the choice? I cannot see what in the sources should
> > be responsible - there is nothing in the diff5.3.2-5.3.1
> > file to suggest such a change.
> >
> > How does GCC decide which compiler to use?
> 
> It's more a case of how does make decide which compiler to use.
> Normally, it's the source file suffix that determines it, so
> file.c would cause make to invoke the rule for .c files which
> would call the C compiler (gcc) and file.cpp would invoke the rule
> for .cpp files which would call the C++ compiler (g++).
> 
> It sounds like the project _is_ pure C and should be compiled
> as pure C, but for some reason the C++ compiler is incorrectly
> being called for one or more files.
> 
> If you can zip up the project and email it to me, I'll have
> a look and see if I can spot what's going wrong.
> 
I don't know if it is relevant on RISC OS, but on linux I haveoccasionally had a problem where if the suffix was a capitalc (i.e. file.C) it would compile it as c++.
Regards,Alan 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riscos.info/pipermail/gcc/attachments/20151130/43b4635f/attachment.html>


More information about the gcc mailing list