[Top][All Lists]

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

[Bug-apl] Possible bug in Parser.cc

From: Elias Mårtenson
Subject: [Bug-apl] Possible bug in Parser.cc
Date: Fri, 28 Mar 2014 16:33:50 +0800

The file Parser.cc, line 476, looks like this:

const int funtag = tos[src].get_tag() & ~TC_MASK | TC_FUN12;

Because & binds stronger than |, the compiler parses this as:

const int funtag = (tos[src].get_tag() & ~TC_MASK) | TC_FUN12;

I believe this is incorrect, and the intention is this instead:

const int funtag = tos[src].get_tag() & (~TC_MASK | TC_FUN12);

Even if the former is the intended form, I suggest adding parentheses to clarify this (enabling full warnings emits a warning about this).


reply via email to

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