On Tue, Jan 12, 2016 at 02:38:50PM -0800, Ben Hutchinson wrote: > Also, I thought that to make it stdcall, you > needed to use __attributes__((stdcall)), not a standalone __stdcall. These > are the "weird" things that set TCC apart from all other C compilers I > thought, yet you say these C compiler standards also work in TCC? > > And by the way, I think __stdcall (with 2 underscores) for setting the use > of STDCALL calling convention is a Microsoft thing (as used in VC++). The > official C standard for setting the use of STDCALL calling convention is > actually supposed to be _stdcall (with 1 underscore). Isn't that correct?
stdcall is a Microsoft thing. What are these C compiler standards you are talking about? AFAIK there are no standards for stdcall, only conventions. In a time before Cygwin and MinGW GCC did not know about stdcall. As GCC already had some other __attribute__((somethings)) they implemented stdcall as another function attribute instead of adding a new keyword. To get the Microsoft keyword #define __stdcall __attribute__((stdcall)) __stdcall has two underscores because the C standard (the real standard) says that all names that begin with two underscores are reserved, meaning you're on your own if there are name clashes when your code introduces a variable, function, or macro with the same name. Daniel _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
