4943 |
@node C Compiler |
@node C Compiler |
4944 |
@subsection C Compiler Characteristics |
@subsection C Compiler Characteristics |
4945 |
|
|
4946 |
|
The following macros provide ways to find and exercise a C Compiler. |
4947 |
|
There are a few constructs that ought to be avoided, but do not deserve |
4948 |
|
being checked for, since they can easily be worked around. |
4949 |
|
|
4950 |
|
@table @asis |
4951 |
|
@item Don't use lines containing solitary backslashes |
4952 |
|
They tickle a bug in the HP-UX C compiler (checked on HP-UX 10.20, |
4953 |
|
11.00, and 11i). Running the compiler on the following source, |
4954 |
|
|
4955 |
|
@example |
4956 |
|
#ifdef __STDC__ |
4957 |
|
/\ |
4958 |
|
* A comment with backslash-newlines in it. %@{ %@} *\ |
4959 |
|
\ |
4960 |
|
/ |
4961 |
|
char str[] = "\\ |
4962 |
|
" A string with backslash-newlines in it %@{ %@} \\ |
4963 |
|
""; |
4964 |
|
char apostrophe = '\\ |
4965 |
|
\ |
4966 |
|
'\ |
4967 |
|
'; |
4968 |
|
#endif |
4969 |
|
@end example |
4970 |
|
|
4971 |
|
@noindent |
4972 |
|
yields |
4973 |
|
|
4974 |
|
@example |
4975 |
|
@error{}cpp: "foo.c", line 13: error 4048: Non-terminating comment at end of file. |
4976 |
|
@error{}cpp: "foo.c", line 13: error 4033: Missing #endif at end of file. |
4977 |
|
@end example |
4978 |
|
|
4979 |
|
@noindent |
4980 |
|
Removing the lines with solitary backslashes solves the problem. |
4981 |
|
@end table |
4982 |
|
|
4983 |
@defmac AC_PROG_CC (@ovar{compiler-search-list}) |
@defmac AC_PROG_CC (@ovar{compiler-search-list}) |
4984 |
@acindex PROG_CC |
@acindex PROG_CC |
4985 |
@ovindex CC |
@ovindex CC |