Date: Sun, 28 Dec 97 21:14:16 PST From: Noam Rotem Subject: Re: The warning <-- Solved. Thank you To: Eli Zaretskii Cc: djgpp AT delorie DOT com Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Precedence: bulk --- On Sun, 28 Dec 1997 11:23:28 +0200 (IST) Eli Zaretskii 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