Mail Archives: djgpp/2000/04/17/11:05:53

From: buers AT gmx DOT de (Dieter Buerssner)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: inefficiency of GCC output code & -O problem
Date: 17 Apr 2000 15:06:03 GMT
Lines: 22
Message-ID: <>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000417163323 DOT 17688D-100000 AT is>
NNTP-Posting-Host: (
Mime-Version: 1.0
X-Trace: 955983963 8039265 (16 [17104])
X-Posting-Agent: Hamster/
User-Agent: Xnews/03.02.04
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:

>On Mon, 17 Apr 2000, Alexei A. Frounze wrote:
>> Also Watcom C/C++ has one very feature. It can generate code for
>> register and stack based calling conventions. I.e. parameters may be
>> passed either via stack or via registers. It also helps greatly.
>GCC has such a feature as well.  Read the on-line GCC manual about the 
>"-mregparm" switch, for details.

Certainly, gcc has such a feature. But it is (almost) unusable.
When you call the library, the program will stop working. Recompiling
the library won't help, because of the asm code.

Other compilers circumvent the library problem by __cdecl or
equivalent keywords in the header files. (This will not avoid
all problems, though. It is almost, but not totally transparent
to the code, because of function pointers.) 

Regards, Dieter

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019