]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi (C Compiler): Solitary backslashes.
authorAkim Demaille <akim@epita.fr>
Thu, 14 Nov 2002 08:17:46 +0000 (08:17 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 14 Nov 2002 08:17:46 +0000 (08:17 +0000)
From Paul Eggert and Albert Chin-A-Young.

ChangeLog
doc/autoconf.texi

index bcfb8e3e494d5852ffce4c65a14d84b6aecae992..def5e2445e348e38703f37905a52da7817d14d2a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-14  Akim Demaille  <akim@epita.fr>
+
+       * doc/autoconf.texi (C Compiler): Solitary backslashes.
+       From Paul Eggert and Albert Chin-A-Young.
+
 2002-11-14  Kevin Ryde  <user42@zip.com.au>
 
        * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)): Initialize f=$1 rather
index f4135b870cae8b8c29678fcd3cec939abc6d8f61..ff14a8c2b3d3d9bd7b0026f9ef60bd56b0caed25 100644 (file)
@@ -4943,6 +4943,43 @@ defines @code{SIZEOF_INT_P} to be 8 on DEC Alpha AXP systems.
 @node C Compiler
 @subsection C Compiler Characteristics
 
+The following macros provide ways to find and exercise a C Compiler.
+There are a few constructs that ought to be avoided, but do not deserve
+being checked for, since they can easily be worked around.
+
+@table @asis
+@item Don't use lines containing solitary backslashes
+They tickle a bug in the HP-UX C compiler (checked on HP-UX 10.20,
+11.00, and 11i).  Running the compiler on the following source,
+
+@example
+#ifdef __STDC__
+/\
+* A comment with backslash-newlines in it. %@{ %@} *\
+\
+/
+char str[] = "\\
+" A string with backslash-newlines in it %@{ %@} \\
+"";
+char apostrophe = '\\
+\
+'\
+';
+#endif
+@end example
+
+@noindent
+yields
+
+@example
+@error{}cpp: "foo.c", line 13: error 4048: Non-terminating comment at end of file.
+@error{}cpp: "foo.c", line 13: error 4033: Missing #endif at end of file.
+@end example
+
+@noindent
+Removing the lines with solitary backslashes solves the problem.
+@end table
+
 @defmac AC_PROG_CC (@ovar{compiler-search-list})
 @acindex PROG_CC
 @ovindex CC