bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Possible bug in Parser.cc


From: Juergen Sauermann
Subject: Re: [Bug-apl] Possible bug in Parser.cc
Date: Fri, 28 Mar 2014 17:32:01 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Hi Elias,

it was intended as written, I have added the extra () for clarification in SVN 180.

/// Jürgen

On 03/28/2014 09:33 AM, Elias Mårtenson wrote:
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).

Regards,
Elias


reply via email to

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