www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/12/20:00:14

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Warning : if (x=y)
Date: Wed, 13 Sep 2000 00:48:21 +0100
Organization: Customer of Energis Squared
Lines: 20
Message-ID: <m1etrskc3a85j5h64lhp5hptr5t853vapj@4ax.com>
References: <afelrschg9sb1dd01iktt3jnnivl6o86jn AT 4ax DOT com> <Pine DOT A41 DOT 4 DOT 05 DOT 10009110957500 DOT 41154-100000 AT ieva06 DOT lanet DOT lv>
NNTP-Posting-Host: modem-96.dexfenfluramine.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: newsg2.svr.pol.co.uk 968802555 8486 62.136.89.224 (12 Sep 2000 23:49:15 GMT)
NNTP-Posting-Date: 12 Sep 2000 23:49:15 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Agent 1.7/32.534
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Andris Pavenis <pavenis AT lanet DOT lv> wrote:

> With gcc-2.95.2 -fpedantic-errors is default for C++ ...

Unless you compile the following as C++ code:

int main(void)
{
  char s1[4], s2[4] = "foo";
  
  s1 = s2; /* illegal */
  
  return 0;
}

I don't know if this is bug or feature.  

The gcc docs don't say much about -pedantic-errors being the default.
I suspect only the diagnostics made compulsory by the C++ standard are
on by default, others require -pedantic or -pedantic-errors.

- Raw text -


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