Re: gcc 3 versions won't compile hello.cpp
- From: "Dave Parsons" <dwparsons@xxxxxxxxx>
- Date: Sun, 2 Apr 2006 17:29:10 +0200
On Sat, 1 Apr 2006 20:00:01 UTC, Ilya Zakharevich <nospam-abuse@xxxxxxxxx> wrote:
[A complimentary Cc of this posting was sent to
Dave Parsons
<dwparsons@xxxxxxxxx>], who wrote in article <Ej0w7lFo08Zw-pn2-5icSOo6gtPCI@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
And given that nobody answered my question about existence of #pragma
to switch default cc to _System, it does not look like I may try it
soon. :-(
Where was that thread & what was the problem?
Oh, it was the glib thread. It is quite long, so let me repeat: given
hundreds (if not a thousand) libraries present for for EMX, AND the
fact that the default calling convention for
int foo(int);
changed in (most ports of) gcc3, how can one use gcc3 for non-vertical
development? (With vertical development, one just recompiles the
world for every change in environment...)
Given a pragma to (temporarily) change the default to _System, I could
at least generate wrapper headers for all the headers for existing
libraries, and use a different C_INCLUDE_PATH for gcc3, as in
gcc3/foo/foo.h:
#pragma gcc_cc(_System);
#include "../../emx/foo/foo.h"
#pragma gcc_cc();
Is there a different solution?
Ok, I've read the thread now and I am a bit confused since the
default source code, i.e. no convention modifier used, produced
by both 2.8.1 and 3.3.5 is equivalent.
using:-
gcc -c -S -O2 system.c
-----------------------
#include <os2.h>
int foo( int a, int b )
{
return( a-b );
}
-----------------------
Both use the stack right to left and both prepend an underscore.
With 3.3.5, if you use _System you do not get an underscore and
if you use _Optlink it uses registers and again no underscore.
Obviously, as Rudi pointed out, there is no difference with 2.8.1.
Which is the combination that concerns you?
There is no pragma available that I could find.
--
Cheers,
Dave
.
- Follow-Ups:
- Re: gcc 3 versions: calling conventions
- From: Ilya Zakharevich
- Re: gcc 3 versions: calling conventions
- References:
- Re: gcc 3 versions won't compile hello.cpp
- From: Dave Parsons
- Re: gcc 3 versions won't compile hello.cpp
- From: Ilya Zakharevich
- Re: gcc 3 versions won't compile hello.cpp
- From: Dave Parsons
- Re: gcc 3 versions won't compile hello.cpp
- From: Ilya Zakharevich
- Re: gcc 3 versions won't compile hello.cpp
- Prev by Date: Re: gcc 3 versions won't compile hello.cpp
- Next by Date: Re: gcc 3 versions: calling conventions
- Previous by thread: Re: gcc 3 versions won't compile hello.cpp
- Next by thread: Re: gcc 3 versions: calling conventions
- Index(es):
Relevant Pages
|