tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Small patch


From: grischka
Subject: Re: [Tinycc-devel] Small patch
Date: Thu, 31 Jan 2013 16:29:02 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Vincent Lefevre wrote:
No.  An assertion only makes sense to make sure about what we aren't
entirely sure.  In this case we are sure (that "default" never happens).

You are sure *now*. But imagine that in the future you modify the "if"
at the beginning of the loop to add a 4th operator but you forget to
modify the switch...

If I'd add that 4th operator then I'm sure it would actually work.

BTW, since you are sure now and think an assert is useless anyway,
removing the "default:" (or adding an empty "default:" at the end)
now should be completely safe.

Geez.  Everybody knows that TinyCC isn't the recommended way to
write a compiler.

--- grischka




reply via email to

[Prev in Thread] Current Thread [Next in Thread]