delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/24/11:48:42

Date: Wed, 24 Dec 97 18:33:25 PST
From: Noam Rotem <nrotem AT johnbryce DOT co DOT il>
Subject: Re: The warning <-- Solved. Thank you
To: djgpp AT delorie DOT com
Message-ID: <Chameleon.971224184358.nrotem@netvision.netvision>
MIME-Version: 1.0

--- On Wed, 24 Dec 1997 16:26:51 +0200 (IST)  Eli Zaretskii 
<eliz AT is DOT elta DOT co DOT il> wrote:

>
>On Wed, 24 Dec 1997, Grzegorz Adam Hankiewicz wrote:
>
>> Thanks to all who answered. I've compiled successfully the 
following
>> code without any warnings:
>> 
>> char line[4][2] = {
>> 		 {2,1,2,1},
>> 		 {3,4,2,1}
>> 		};
>
>I don't think this is the correct initialization.  The 
correct one should 
>include 4 arrays of 2 numbers, not 2 arrays of 4.

It's wrong, and the compiler shouldn't compile it. 
Initializing a row of 2 values with 4 values is an error of 
syntax..

Is there any methodic reason for ignoring this error, or is 
it a bug of the compiler?

---------------------------------------------
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.

---
24/12/97
18:33:26

- Raw text -


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