Project

General

Profile

Bug #7251

A warning or error is needed when a value is truncated

Added by Andrei Tatarnikov almost 4 years ago. Updated about 2 months ago.

Status:
Rejected
Priority:
High
Category:
nML Translator
Target version:
Start date:
05/25/2016
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

Constant expressions are cast to nML types depending of the context. For example, in expressions of kind "VARIABLE operator CONSTANT", CONSTANT is cast to the type of VARIABLE. If CONSTANT is larger than can be represented by the type, its higher bits are truncated. This can lead to unexpected results. For this reason, in such situations a warning or an error must be generated.

Example:

In "x + 32" where x has type card(5), 32 gets truncated to 0.

History

#1

Updated by Alexander Kamkin 3 months ago

  • Target version changed from 2.3 to 2.5
  • Assignee changed from Andrei Tatarnikov to Alexander Kamkin
#2

Updated by Alexander Kamkin 2 months ago

  • Assignee changed from Alexander Kamkin to Artem Kotsynyak
#3

Updated by Alexander Kamkin about 2 months ago

  • Status changed from New to Rejected

Duplicates #9472

Also available in: Atom PDF