[LLVMbugs] [Bug 9821] New: Check whether values get truncated because they don't fit in the memory region

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Apr 30 19:12:47 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=9821

           Summary: Check whether values get truncated because they don't
                    fit in the memory region
           Product: clang
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: akyrtzi at gmail.com
                CC: llvmbugs at cs.uiuc.edu


struct S {
  unsigned x : 3;
};

void foo() {
  struct S s;
  int y=30;
  s.x = y; // warn that value in y gets truncated
  unsigned long long ll = -1;
  unsigned int i = ll; // warn that value in ll gets truncated
}

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list