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

    <tr>
        <th>Summary</th>
        <td>
            clang on windows (VS 2022) provides unhelpful error message when attempting to use alloca
        </td>
    </tr>

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

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

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

<pre>
    ```
c:\Users\protz\Desktop\hacl-packages>clang --version
clang version 17.0.3
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\bin

c:\Users\protz\Desktop\hacl-packages>clang test.c
test.c:5:12: error: call to undeclared library function 'alloca' with type 'void *(unsigned long long)'; ISO C99 and
      later do not support implicit function declarations [-Wimplicit-function-declaration]
 5 |   int *x = alloca(sizeof(int));
      |            ^
test.c:5:12: note: include the header <stdlib.h> or explicitly provide a declaration for 'alloca'
1 error generated.

c:\Users\protz\Desktop\hacl-packages>type test.c
#include <string.h>
#include <stdlib.h>

int main() {
 int *x = alloca(sizeof(int));
  memset(x, 0, sizeof(int));
  return x[0];
}
```

the recommendation to use `stdlib.h`, as provided in the error message, is incorrect, since what I need for this particular toolchain is `malloc.h`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVM2O2zYQfprxZWCDpkzLOvjglddAgBYtkDQ9FhQ5lthQpEBSXm-evqAkbzZF20MjGJJAftR8P-ORMZrWER1BPIE4r-SYOh-OfRyCT19XjdevR9iz5cfOwE4KihOI-rdIIYKoJyCI-kzxS_IDiLqTyq4Hqb7IliIUz8pK1-J6faMQjXfLV6bFZQm35YZtinnnkwwtJShOeD_s_9jv1oNavxin_Utc9_GmFlQXSGrsvSabsYOP5j5vfXAxSWtJn03IW_VM-Nfg2yB7vBhLmfjPRgUf_TX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