Re[4]: [AD] adding new target to allegro: OpenWatcom Win32

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


Hello Eric,

Friday, August 13, 2004, 11:10:46 AM, you wrote:

>> void myfunc(void); // - this will use compilers custom one.

EB> Wonderful ;-)  For every single function, even if it is not private to the
EB> compilation unit?

Wonderful things are everywhere in the allegro sources:
What the sense is to write constructions such as "(void (*proc)(void)"
directly
and have special macros (AL_METHOD etc.) for the same defined?
There's inconsistency throughout the
sources - somewhere macros and somewhere direct declarations -
that's what makes Allegro porting a real pain :(

EB>  And this can't be turned off at all?  The Watcom compiler
EB> almost deserved its death then...

It's not even. Watcom is much faster that GCC and has several
features which GCC, MSVC don't have. I don't want grow roots while GCC
or MSVC compiles.

>> The issue makes it problematic to use atexit() function because it
>> expects a pointer to a function with compiler's default calling
>> convention.

EB> Even more wonderful ;-)  Maybe we should require the compiler not to break
EB> ANSI C in such trivial ways before starting to port Allegro to it.

I consider it normal for how could atexit() call functions of
different calling conventions? Any pointer to a function must be
marked as a function with a certain convention and if none stated -
default compilers (and RTL) c.c. is assumed. So maybe a macro like
AL_FUNCPTR(type, params) should be defined. I'll look through the
sources more...


-- 
Best regards,
 Juras                            mailto:ybxsoft@xxxxxxxxxx





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