delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/28/14:29:32

Date: Sun, 28 Dec 97 21:14:16 PST
From: Noam Rotem <nrotem AT johnbryce DOT co DOT il>
Subject: Re: The warning <-- Solved. Thank you
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: djgpp AT delorie DOT com
Message-ID: <Chameleon.971228212432.nrotem@netvision.netvision>
MIME-Version: 1.0

--- On Sun, 28 Dec 1997 11:23:28 +0200 (IST)  Eli Zaretskii 
<eliz AT is DOT elta DOT co DOT il> wrote:

>
>On Fri, 26 Dec 1997, Noam Rotem wrote:
>
>> I tested the *wrong* code on my djgpp, and it *did not* 
>> complain - not even a warning... This is what my question 
>> referred to as a potential bug.
>
>What code was that?  And did you use -Wall switch to gcc?

I was compiling (deliberately) the following lines:

main()
  {
  int a[4][2]={{3,4,5,6},{5,6,7,8}};
  return 0;
  }

Following your advice, I added the -Wall switch permanently to my arguments' 
list. Now it gives me a column of similar warnings (one for every line on 
matrix):

Warning:  excess elements in array initializer after `Mat[0]'

My question is - why do Borland compilers treat this wrong syntax as an 
error, while dgjpp only warns against it?

---------------------------------------------
Noam Rotem
John Bryce Training Centre
Tel Aviv, Israel.
03-7535803
=============================================
1. Take upon yourself an impossible mission.
2. Accomplish the mission.
3. Go back to step 1.

It's the only sane answer to modern life.

---
28/12/97
21:14:17

- Raw text -


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