<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/139033>139033</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [aarch64] clang compile error, when compile a C file, however succeess when rename the file to cpp
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          scoutzeng
      </td>
    </tr>
</table>

<pre>
    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.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxUU82SqzgPfRplowplBOFnwYJOvnx1F7OZWzXbLgMK-F5jM7ZJuufppwzpn1mF0pFOpHN8pPdqNMwNnF7gdDnINUzWNb63a_iHzXjo7PDe9FqaEe_svLIGshbTOkmTFETbz_I3f0fyRGzAXflVavRhHZTFxVlMSyRBBKL9AVTOOFplRgwWezsvSjNKnFhr-7BOD3FidHLGWSqT9CBaKARQpkyv14ERsrMPg7LJBNn_IvofSLr51bA1n6holQkbF1AFVCOUL1u9ViYU-Ru9BpQI2SUCmAKdCaG8QPbs6q3xASNHt3Wln8jXvGO_YXc_6b9fzasvcqBKAp2xA6o_JxyH1RkUz0J5iZeJ1hp8K3J8KDPYh8dFy3Czbo7jClfPCIXY1cbjT0wSoKt3PR5fMMHj_xGI_tol_7lL_iE3ER5bbP_8o8ihEF8sx2O3Kj1gEqu9nWdpBv_NjvjHk33wnd1HyaFdw7IGlAbZOesi2_5xJnEqo__8tnAfeMBNMmlCrDj22_soRILtLbDDMMmACn-tPmA_STMyhomfbsct9q9liWuEiQ3GRd7DpEZUHu3vBH_s0w9rBnb4iISTXBY2A2RXfEzvqLCXBqgMaOTMqAJKjxLPeFOak8PQZEOd1fLATVrmRVGVaZ4fpkYMsqqyqhuqG2U552nWlTXJG3HJaZoOB9WQoJM4iUoUJ6I8GU7iVp7Suq5ll1VpAbngWSqdaH2fE-vGg_J-5SbNapFlBy071n6LHNGWLSCK6XNNHDh26-ghF1r54L8oggp6y6mUrp-KHE4X3IP5EaDNiijYIwr2Fav94O-G-rXvmb3fOx1v-kQDYuP2CJblsDrdTCEsHrIW6Ap0HVWY1i7p7Qx0jYs9f46Ls7-4D0DX7VAPdH3eem_o3wAAAP__iEtf2A">