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 13:22:22 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Vincent Lefevre wrote:
On 2013-01-31 10:52:14 +0100, Thomas Preud'homme wrote:
Le jeudi 31 janvier 2013 02:07:36, Domingo Alvarez Duarte a écrit :
        switch(op) {
        case '&':
            pe->v &= e2.v;
            break;
        case '|':
            pe->v |= e2.v;
            break;
        default:
        case '^':  ///////////////////////////////////////what this case
after default mean ????????
            pe->v ^= e2.v;
            break;
        }
Looks weird indeed but I am reluctant to change it when I don't know why it was done this way in the first place. Since the file was commited in one go, I can't see if this result from a mistake or if it was intentional. We can consider changing this and the other such example right after the release.

Perhaps there was a "default:" by default the author forgot to remove.
And as it is probably just useless (if op can only be '&', '|' or '^'),
no-one noticed it.

I guess it was to avoid a compiler warning such as
        "case X not handled in switch"

--- grischka




reply via email to

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