This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to make gcc print messages during compilation.
- To: ssathyan at india dot smartstorage dot com
- Subject: Re: How to make gcc print messages during compilation.
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Fri, 30 Jun 2000 19:16:30 +0200
- CC: egcs at egcs dot cygnus dot com
- References: <OFC54936BC.A32B4401-ON8525690E.00760DC7@india.smartstorage.com>
> (1) How we can make gcc to print user messages during the compilation
> process.
With the #error directive, or with the #warning directive.
> (2) Is there a way I can stop the compilation with error messages Like
> #error preprocessor directive in VC++ compilers.
Yes, the #error directive. That's not a MSVC invention - it is part of
the international standard.
> (3) Is there a good book or web site which gives a good documentation of
> how to use gcc. Apart from man and info.
There is a gcc manual available, which you can order from the
FSF. However, it is the same material as the texinfo documentation.
Please note that gcc, in general, aims at implementing the relevant
standards for the languages it supports. So any good book on the
language is also a good book for GCC usage. In this particular case, a
good book on C or C++ would have told you that you can rely on #error
being there in every self-respecting compiler.
Regards,
Martin