[Mesa-dev] c99 vs v90
Jose Fonseca
jfonseca at vmware.com
Thu Aug 4 10:36:35 UTC 2016
On 04/08/16 11:25, Enrico Weigelt, metux IT consult wrote:
> On 04.08.2016 11:38, Jose Fonseca wrote:
>
>> __FUNCTION__ has been around for a very long time (before 1999), so it's
>> no surprise that MSVC has it. But not implementing __func__ does seem a
>> oversight. I believe they fixed it on MSVC 2015.
>
> hmm, okay. as long as we're supporting msvc'03, I'd suggest moving
> everything to __FUNCTION__, which seems to be the most portable
> one right now.
>
> When, one day, we move up to msvc'15, we can reconsider moving to
> __func__.
As I said,
#define __func__ __FUNCTION__
neatly solves the problem.
>> To be clear, GNU C++ is the non-standard one here. MSVC is following
>> the spec. It's just a ptty that the C and C++ standard bodies don't
>> strive for consistency.
>
> Now I'm getting confused ... C++ standard has __func__, but C doesnt ?
No. It's nothing to do with __func__. C++ lacks C99 things like
structure initializers.
>
>>> by the way: what's the exact reason for using msvc instead of gcc on
>>> win32 ?
>>
>> GCC on Win32 (MinGW) is not reliable (lots of known bugs.) But above
>> all, it's impossible to debug Mingw executables on Windows: one has to
>> use GDB to debug Mingw DLLs/EXEs because Microsft debuggers don't
>> understand DWARF debug info, and one has to use Microsof debugger to
>> debug Microsoft DLLs/EXEs. So it's impossible to debug an app that uses
>> both, which is always the case if the OpenGL driver is built with GCC.
>
> hmm, sure that this is still the case ? (I knowledge on win32
> development quite limited - last time I actively did that must be
> decades ago ...)
I'm definitely sure. I know there are projects out there hapilly using
MinGW. And we use MinGW for development too. But it's not production
ready.
>> But Microsoft has been working on a Clang/LLVM frontend for their
>> compiler, capable of genering debug info on MS format. So I have hopes
>> we could one day switch to it. It still in its early infancy though.
>
> hmm, what about building w/ clang anyways ?
No idea what you're asking.
Anyway, I think satisfied your curiosity and provided enough feedback.
You'll just gonna have to figure the rest yourself.
>
>>> can I also deploy it to some VM there and log in via VNC ?
>>
>> No, not that I know of.
>
> hmm, so I can't actually test the win32 builds :(
Just push your experiments into a branch in github, and Appveyor will
test it.
Jose
More information about the mesa-dev
mailing list