Jump to content
  • Advertisement

Jason Goepel

Member
  • Content count

    117
  • Joined

  • Last visited

Community Reputation

797 Good

About Jason Goepel

  • Rank
    Member

Personal Information

  • Industry Role
    Programmer
  • Interests
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Jason Goepel

    Bitwise Operator

    Thanks for implementing this. I do have one question. I notice you are testing the left-hand and right-hand contexts for floating-point types. Since the bit-wise comparison only applies to integral types, why not test more explicitly for those (like below)? // Also do not permit implicit convertion to integer in this case as the user may think // the result is a bitwise operation on the original type but it's not if (!lctx->type.dataType.IsIntegerType() && !lctx->type.dataType.IsUnsignedType()) { asCString str; str.Format(TXT_ILLEGAL_OPERATION_ON_s, lctx->type.dataType.Format(outFunc->nameSpace).AddressOf()); Error(str, node); // Set an integer value and allow the compiler to continue ctx->type.SetConstantDW(asCDataType::CreatePrimitive(ttInt, true), 0); return; } if (!rctx->type.dataType.IsIntegerType() && !rctx->type.dataType.IsUnsignedType()) { asCString str; str.Format(TXT_ILLEGAL_OPERATION_ON_s, rctx->type.dataType.Format(outFunc->nameSpace).AddressOf()); Error(str, node); // Set an integer value and allow the compiler to continue ctx->type.SetConstantDW(asCDataType::CreatePrimitive(ttInt, true), 0); return; }
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!