delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/20/01:30:29

Message-ID: <38FE9B26.A0D244EE@unb.ca>
From: Endlisnis <s257m AT unb DOT ca>
X-Mailer: Mozilla 4.7 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: inefficiency of GCC output code & -O problem
References: <Pine DOT LNX DOT 4 DOT 10 DOT 10004161837540 DOT 1138-100000 AT darkstar DOT grendel DOT net> <38F9D717 DOT 9438A3F6 AT mtu-net DOT ru> <8df84a DOT 3vvqu6v DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de> <38FB4094 DOT DE7B5F4C AT mtu-net DOT ru> <8dfum2 DOT 3vvqu6v DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de> <38FB7858 DOT 41B090DB AT mtu-net DOT ru> <8dh6kr DOT 3vvqvqr DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de> <38FC0E77 DOT 904B12BE AT mtu-net DOT ru> <8dibun DOT 3vvqvqr DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de> <38FDCD15 DOT 7BC68C13 AT mtu-net DOT ru>
Lines: 38
Date: Thu, 20 Apr 2000 05:50:43 GMT
NNTP-Posting-Host: 24.114.6.233
X-Complaints-To: abuse AT home DOT net
X-Trace: news1.rdc1.on.wave.home.com 956209843 24.114.6.233 (Wed, 19 Apr 2000 22:50:43 PDT)
NNTP-Posting-Date: Wed, 19 Apr 2000 22:50:43 PDT
Organization: @Home Network Canada
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Alexei A. Frounze" wrote:

> > >> >      };
> > >>         ^
> > >> Why this semicolon? The same thing I see everywhere in your sources.
> > >
> > >Do you think this semicolon makes something slower?
> >
> > No. But why the semicolon. It seems highly unconventional to me.
>
> But not for me. Let me explain it... First programming language that I've learnt
> is Pascal (I don't say about Basic, because IMHO it's not a PL, it's something
> for beginners and dummies :). In Pascal composite operators are made this way:
>
> BEGIN
>   operator1;
>   operator2;
> END;
>    ^ this semicolon must be present always.

But, in C, if you try:

if(expr) {
  func();
  func();
  };  /* <--- */
else
  func();

You will get a parse error.

--
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT HotMail DOT com
          ICQ: 32959047


- Raw text -


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