www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/23/10:24:46

Newsgroups: comp.os.msdos.djgpp
From: cigna AT helios DOT phy DOT OhioU DOT Edu (Dave Cigna)
Subject: Re: Laugh at my mistakes (Errors you wish you're mother told you about)
Message-ID: <DzpqvL.rF@boss.cs.ohiou.edu>
Sender: news AT boss DOT cs DOT ohiou DOT edu (News Admin)
Organization: Ohio University Physics and Astronomy
References: <199610221957 DOT MAA26135 AT netcom8 DOT netcom DOT com>
Date: Wed, 23 Oct 1996 05:21:21 GMT
Lines: 18
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>[deletia]
>
>> Very common for me using a compiler that doesn't throw a warning about 
>> setting value where it suspects a comparator should be.
>
>I does warn you if you enable warnings.  Try -Wall.

A little trick that (I never use, but seems kind of cool anyway):

  if(0 = A)
 
instead of 

  if(A = 0)

will always generate an error, even without -Wall.

 -- Dave Cigna

- Raw text -


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