summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Jennings <mej@lbl.gov>2013-03-06 15:55:55 -0800
committerMichael Jennings <mej@lbl.gov>2013-03-06 15:55:55 -0800
commit12e2329458361da47e42f1b6266280cf8902b7a5 (patch)
tree8dee6d8780779a7c055c79dcde074a980fac6adf
parent5ad1be28c1b1e89a41eed74887ec7177393c1523 (diff)
downloadlibast-12e2329458361da47e42f1b6266280cf8902b7a5.tar.gz
Fix CSE check.
-rw-r--r--libast.m413
1 files changed, 4 insertions, 9 deletions
diff --git a/libast.m4 b/libast.m4
index 02adcff..bc604fa 100644
--- a/libast.m4
+++ b/libast.m4
@@ -373,28 +373,23 @@ dnl#
AC_DEFUN([AST_COMPILER_CHECKS], [
AC_MSG_CHECKING([for ({...}) compiler support])
AC_CACHE_VAL(ast_cv_compiler_compound_statement_expr, [
- AC_TRY_COMPILE(
+ AC_TRY_COMPILE([],
changequote(<<, >>)dnl
<<
-int main(void)
-{
int a = 1, b = 2, c = 3, d;
d = ({ b *= c; a += b - c; a + b + c; });
return 0;
-} >>
+>>
changequote([, ]),
[ast_cv_compiler_compound_statement_expr=0],
- [ast_cv_compiler_compound_statement_expr=1],
- [ast_cv_compiler_compound_statement_expr=2])
+ [ast_cv_compiler_compound_statement_expr=1])
])
if test $ast_cv_compiler_compound_statement_expr -eq 0; then
AC_MSG_RESULT([yes])
AC_DEFINE([LIBAST_SUPPORT_MACRO_CSE], [1], [Defined if compiler supports compound statement expressions.])
- elif test $ast_cv_compiler_compound_statement_expr -eq 1; then
- AC_MSG_RESULT([no])
else
- AC_MSG_RESULT([unknown, assuming none])
+ AC_MSG_RESULT([no])
fi
])