Exit code for errors detected by cpplib

Theodore Papadopoulo Theodore.Papadopoulo@sophia.inria.fr
Tue Nov 30 23:59:00 GMT 1999


Just two comments from someone that does not know much about gcc.

+ unsigned int
+ cpp_get_num_errors ()
+ {
+   return cpp_errors;
+ }
+ 
+ void
+ cpp_get_num_errors (num)
+      unsigned int num;
+ {
+   cpp_errors = num;

There is at least a typo here....
The second cpp_get_num_errors should be a cpp_set_num_errors...

+ #ifdef USE_CPPLIB
+   /* Make sure that any errors detected by cpplib get reflected in the
+      exit status of gcc.  */
+   if (cpp_get_num_errors ())
+     ++ errorcount;
+ #endif

Also I wonder why you don't use:

errorcount += cpp_get_num_errors ();

	Theo.

--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
 --------------------------------------------------------------------




More information about the Gcc-patches mailing list