Issue 139033
Summary [aarch64] clang compile error, when compile a C file, however succeess when rename the file to cpp
Labels clang
Assignees
Reporter scoutzeng
    clang version: 19.1.1
cmake version: 4.0.1
visual studio pro 17 2022
I'm going to compile a helloworld program main.c
`#include <stdio.h>
#include <arm_neon.h>

int main() {
	int64x2_t a = { 1,2 };
	const int b = 1;
	int64x2_t res = vshlq_n_s64(a, b);
	return 0;
}`
on x64 windows platform, i use `cmake  -S ../src -B . -G "Visual Studio 17 2022" -A ARM64` `cmake --build .` commands to compile, however compiler output an error `error C2057: expected constant _expression_`. After that i just change the main.c to main.cpp, then everythig is ok. I just wonder what happend? why i can't name it as a C file.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to