]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi (C Compiler): Warn about #error. Follows up
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 6 Apr 2006 07:58:20 +0000 (07:58 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 6 Apr 2006 07:58:20 +0000 (07:58 +0000)
on a patch proposed by Ralf Wildenhues.

ChangeLog
doc/autoconf.texi

index 0930e1654fc4102fe1a5b461272a975e3be71519..c751559a3b3b06720d05599f2f9999282cb0216b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * doc/autoconf.texi (C Compiler): Warn about #error.  Follows up
+       on a patch proposed by Ralf Wildenhues.
+
 2006-04-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        * lib/autoconf/status.m4: Replace <space>''<tab> with
index bbf3e486d86deb7b0b46763e8a9b00b4917e65f0..220f0527c01652794cd3c9261f5230eebcc90eb2 100644 (file)
@@ -5795,6 +5795,15 @@ This can cause problems if you observe the output of the compiler to
 detect failures.  Invoking @samp{cc -c a.c && cc -c b.c && cc -o c a.o
 b.o} solves the issue.
 
+@item Don't rely on @code{#error} failing
+The @sc{irix} C compiler does not fail when #error is preprocessed; it
+simply emits a diagnostic and continues, exiting successfully.  So,
+instead of an error directive like @code{#error "Unsupported word size"}
+it is more portable to use an invalid directive like @code{#Unsupported
+word size} in Autoconf tests.  In ordinary source code, @code{#error} is
+OK, since installers with inadequate compilers like @sc{irix} can simply
+examine these compilers' diagnostic output.
+
 @item Don't rely on correct @code{#line} support
 On Solaris 8, @command{c89} (Sun WorkShop 6 update 2 C 5.3 Patch
 111679-08 2002/05/09)) diagnoses @code{#line} directives whose line