This is the mail archive of the gcc-bugs@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]

Re: Warning about multiply defined __P on SunOS


Wolfgang Bangerth <wolf@gaia.iwr.uni-heidelberg.de> said:
> using egcs on SunOS 5.6 I get error messages from the preprocessor,
> telling me the following:
> 
> In file included from
> /usr/local/gcc/egcs-19980803/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.53/incl
> ude/math.h:5,
>                  from /usr/local/gcc/egcs-19980803/include/g++/cmath:7,
>                  from problem_base.cc:20:
> /usr/include/math.h:19: warning: `__P' redefined
> /usr/local/include/sys/cdefs.h:80: warning: this is the location of the
>                                    previous definition
> 
> Actually, I don't know whether this does any harm, but it makes me feel a
> bit unsafe. Also, I do not know who is guilty, because the error happens
> in standard headers belonging to the system rather than to egcs. Any
> simple cure?

The guilty party is whoever installed /usr/local/include/sys/cdefs.h ;-)
Fix that one to use something different (not __P) for argument lists.
-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513


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