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]

Re: How to make gcc print messages during compilation.


> (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


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