llvm-mingw icon indicating copy to clipboard operation
llvm-mingw copied to clipboard

tmpfile() returns NULL with amd64 compiler

Open mirek-fidler opened this issue 4 years ago • 1 comments

#include <stdio.h>

int main(int argc, const char *argv[]) { printf("%p", tmpfile()); return 0; }

prints 0

(it works fine with i686 bit compiler, not tested with arm version, tested with latest release)

mirek-fidler avatar Nov 17 '21 09:11 mirek-fidler

I can reproduce this, when targeting msvcrt.dll - with UCRT it works fine. (With msvcrt.dll, it seems to work fine on armv7 and aarch64 too though.)

I won't act further upon it here; feel free to file it as an issue upstream in mingw-w64, requesting them to wrap/reimplement this function for msvcrt targets.

mstorsjo avatar Nov 17 '21 09:11 mstorsjo