This is the mail archive of the gcc-help@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: Make error (gcc)




  A couple of things jump out at me, but I'm not a C++ expert so
I could get some of it wrong.

-------snip----------
In file included from real.h:18,
                 from mylist.h:13,
                 from neighval.h:22,
                 from neighval.cpp:19:
undefd.h:47: declaration of 	nt isnan (double)' throws different 
exceptions
/usr/include/bits/mathcalls.h:221: than previous declaration 	nt isnan 
(double) throw ()'
undefd.h:77: declaration of 	nt isinf (double)' throws different 
exceptions
/usr/include/bits/mathcalls.h:184: than previous declaration 	nt isinf 
(double) throw ()'
-------snip----------

  Why do these error messages report the return type as being 'nt' ? 
What happened to the 'i' of 'int' ?  In any case, this is almost
certainly a problem due to the fact that 2.96 is more recent and 
properly handles throw specifiers, whereas 2.91 probably just ignored
them; or perhaps the libstdc++ that comes with 2.91 doesn't have
throw specifiers on the function prototypes in the header files, but
the version of libstdc++ with 2.96 does.

  In any case, the underlying problem here is that you're providing
a redeclaration of the functions isnan and isinf that don't match what
you have in your library headers, so the compiler complains.  It's
best not to declare functions twice, nor to do so in your own .h
files when there are system headers you should use instead.

-------snip----------
tbool.h:58: parse error before '
tbool.h: In method  t_xor<T, Z>::operator() (const T &, const T &) 
const':
tbool.h:158: parse error before '
tbool.h: At top level:
tbool.h:228: parse error before '
-------snip----------

  These gibberish characters are carriage returns, your code has
the wrong kind of end-of-line markers (pc style CRLF, instead of
Unix style LF).  Fix them by converting the line ends before you
try and build again.

     DaveK
-- 
 All your base are belong to us!


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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