1
dnl @synopsis AC_CXX_NEW_FOR_SCOPING
3
dnl If the compiler accepts the new for scoping rules (the scope of a
4
dnl variable declared inside the parentheses is restricted to the
5
dnl for-body), define HAVE_NEW_FOR_SCOPING.
7
dnl @version $Id: ac_cxx_new_for_scoping.m4,v 1.1 2005/09/17 07:10:49 msala Exp $
8
dnl @author Luc Maisonobe
10
AC_DEFUN([AC_CXX_NEW_FOR_SCOPING],
11
[AC_CACHE_CHECK(whether the compiler accepts the new for scoping rules,
12
ac_cv_cxx_new_for_scoping,
17
for (int i = 0; i < 10; ++i)
19
for (int i = 0; i < 10; ++i)
22
ac_cv_cxx_new_for_scoping=yes, ac_cv_cxx_new_for_scoping=no)
25
if test "$ac_cv_cxx_new_for_scoping" = yes; then
26
AC_DEFINE(HAVE_NEW_FOR_SCOPING,,[define if the compiler accepts the new for scoping rules])