Message-ID: <3697A081.AF8E9AD1@montana.com> Date: Sat, 09 Jan 1999 11:31:29 -0700 From: bowman X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Warning wanted References: <004e01be3b94$fd372200$d3f8c6c3 AT johans-dator> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Johan Henriksson wrote: > > It took me 2 hours to fix this problem! Can't you guys implement a > warningsignal when this kind of declarations are done? A pitfall less for us > Basicprogrammers :) If you compile with the -Wall switch, it will report 'warning: left-hand operand of comma expression has no effect' for int array[10,10]. If you review the gcc documentation, there are a number of warnings that may be enabled on the command line. If you are moving to C from BASIC, I'd urge you to at least always use -Wall, and to investigate and understand every warning it throws. Some may seem a little cryptic, as in the above, but the compiler is cautioning you that you are using C in a way that, while not exactly incorrect, is probably not what you intended.