Re: [AD] MSVC 8 cl flags

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I don't take this one. C89 compiler is still C compiler. Even C K&R 
> compiler is C compiler. And, definitely, C89 compiler isn't C++ 
compiler :-)

Eh? I think there's some mixup somewhere. A C89 compiler is definately a C 
compiler and not a C++ compiler. I don't think I said otherwise...?
What I said is that a C++ compiler is not a C compiler. Since C89 is 
practically a subset of C++ (there are only a few minor differences), this 
isn't an issue with C89 code, but it is an issue with C99 code, which can 
contain constructs that are not standard C++.

> However this has absolutely nothing to do with Allegro up to 4.2 as
> it is written in pure C89, supporting other C89 only compilers like
> gcc 2.95. (BTW MSVC 6 is from 1996, it cannot be C99 even if they want).

Indeed, it doesn't have anything to do with Allegro 4.2 or MSVC 6.
It had to do with Allegro 4.3 and up possibly being C99 and MSVC 8 not 
supporting C99.

> If Allegro > 4.2 would be C99 (I have nothing against) then simply drop
> C89 compilers like MSVC. But don't say that C89 compiler is not C 
compiler.

I didn't. I said that a C++ compiler isn't a C compiler.
But maybe I didn't make myself clear: to the best of my knowledge, MSVC is 
actually primarily a C++ compiler (despite the name), more than a plain C 
compiler. Sure, it compiles C code, but any C++ compiler can compile C89 
code.
If I'm wrong, please correct me.

> Sadly C library was not written with security in mind. If I understand 
> MS correctly they are not going to remove anything, they are just 
> marking potentially unsafe functions. And this is IMHO good because this 
> is what are warnings for.

Yes. But they should, IMHO, have made a warning that said `Warning: this 
function is potentially unsafe' rather than `Warning: this function is 
deprecated'

> In fact, the only thing which I don't  
> understand is why deprecation of such dangerous functions like gets was 
> not done in C99.

Indeed. But be that as it may, it's not up to Microsoft to single-handedly 
decide that they are.

> Yes, this is why current Allegro is C89, and btw IIRC you can switch gcc 
> to c89 mode (I doubt that anybody is doing that :-) )

Actually, I did a couple of weeks ago. I don't remember what for and I 
don't even remember if it was for Allegro or not, but I did find a few 
things I had to fix (but actually didn't, since they were GNU extensions).

> As long as the dll and headers will be usable with msvc there is not so 
> big problem with dropping msvc for building the dll.

Yes. Still, it'd be a shame if we had to drop MSVC support just as we were 
about to scrap the inline asm code, which is the main reason Allegro 
cannot be compiled with MSVC today.

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/