From: "Björn Persson" <bjorn@xn--rombobjrn-67a.se>
Subject: Re: Ada Leaking Into Day Job
Date: Sun, 21 Mar 2010 01:21:42 +0100
Date: 2010-03-21T01:21:42+01:00 [thread overview]
Message-ID: <80l74nFptU1@mid.individual.net> (raw)
In-Reply-To: 00bf1adf-0a87-42d4-ae72-f80dd125279a@g1g2000pre.googlegroups.com
Adam Beneschan wrote:
> if (code /= 0) { ... }
>
> This is valid C, so the compiler won't complain
Are you sure? ;-)
int main(int argc, char** argv) {
int code = 1;
if(code /= 0) {
return 1;
}
return 0;
}
[beorn@hactar tester]$ LANG=en gcc ada_not_equal.c
ada_not_equal.c: In function 'main':
ada_not_equal.c:3: warning: division by zero
That's even without the otherwise indispensable -Wall.
The problem I have most often when I switch languages is that I get =, :=
and == mixed up.
--
Bj�rn Persson
PGP key A88682FD
next prev parent reply other threads:[~2010-03-21 0:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 17:24 Ada Leaking Into Day Job Warren
2010-03-19 21:53 ` Adam Beneschan
2010-03-21 0:21 ` Björn Persson [this message]
2010-03-22 15:18 ` Warren
2010-03-22 9:53 ` Gautier write-only
2010-03-22 16:55 ` KarlNyberg
2010-03-22 17:07 ` Gautier write-only
2010-03-24 21:48 ` Gautier write-only
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox