This testcase:

# include <complex>
# include <math.h>

# define _I ((complex_t)(1i))
typedef std::complex<double> complex_t;

complex_t f(const double omega) {
  complex_t p = cos (omega) +  _I * sin (omega);
  return p;
}

works in clang40 and clang50, but fails in clang60:

c.c:9:32: error: implicit conversion from '_Complex int' to 'double' is not permitted in C++
  complex_t p = cos (omega) +  _I * sin (omega);
                               ^~
c.c:5:26: note: expanded from macro '_I'
# define _I ((complex_t)(1i))
             ~           ^~
1 error generated.


Yuri

_______________________________________________
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Reply via email to