delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/17/10:02:47

From: "Benjamin 'Killer' Kalytta" <bkausbk AT web DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: function overload in gcc
Date: Mon, 17 Sep 2001 15:46:39 +0200
Organization: T-Online
Lines: 91
Message-ID: <9o4uu3$s8c$04$1@news.t-online.com>
References: <9o0hbg$98u$06$1 AT news DOT t-online DOT com> <9o27fm$sk2$00$1 AT news DOT t-online DOT com> <1000646864 DOT 676853 AT queeg DOT ludd DOT luth DOT se> <9o3qgt$5tn$04$1 AT news DOT t-online DOT com> <3BA570B9 DOT EB526045 AT earthlink DOT net>
Mime-Version: 1.0
X-Trace: news.t-online.com 1000734468 04 28940 3lL3S6EXSSAx2v 010917 13:47:48
X-Complaints-To: abuse AT t-online DOT com
X-Sender: 520031135094-0001 AT t-dialin DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> GCC used as a C compiler does not support function overloading, which is
> not part of the C programming language.  The Gnu Compiler Collection
> (GCC) does include a C++ compiler (g++ or gpp), a Pascal compiler (gpc),
> and a Fortran compiler (g77) among others.  Those other components of
> the Gnu Compiler Collection support language features for those other
> languages, and g++ does indeed support function overloading.

I tried C++ compiler gpp yesterday ... but the problem is, that this
compiler will generate a load of overhead which I don't need. Thats gpp
output:

___gnu_compiled_cplusplus:
.text
 .p2align 2
.globl _main
_main:
LFB1:
 pushl %ebp
LCFI0:
 movl %esp,%ebp
LCFI1:
 xorl %eax,%eax
 jmp L2
 .p2align 4,,7
L2:
 movl %ebp,%esp
 popl %ebp
 ret
LFE1:

 .section .eh_frame
___FRAME_BEGIN__:
 .long LLCIE1

LSCIE1:
 .long 0

  .byte 0x1
  .byte 0x0
  .byte 0x1
  .byte 0x7c
  .byte 0x8
  .byte 0xc
  .byte 0x5
  .byte 0x4
  .byte 0x88
  .byte 0x1
 .p2align 2,0
LECIE1:
  .set LLCIE1,LECIE1-LSCIE1
 .long LLFDE1

LSFDE1:
 .long LSFDE1-___FRAME_BEGIN__

 .long LFB1

 .long LFE1-LFB1

  .byte 0x4
 .long LCFI0-LFB1

  .byte 0xe
  .byte 0x8
  .byte 0x84
  .byte 0x2
  .byte 0x4
 .long LCFI1-LCFI0

  .byte 0xd
  .byte 0x4
 .p2align 2,0
LEFDE1:
  .set LLFDE1,LEFDE1-LSFDE1

that's gcc output:

gcc2_compiled.:
___gnu_compiled_c:
.text
 .p2align 2
.globl _main
_main:
 pushl %ebp
 movl %esp,%ebp
L2:
 movl %ebp,%esp
 popl %ebp
 ret


- Raw text -


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