[LLVMbugs] [Bug 16487] New: Warning for uninitialized structure elements

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 28 15:39:32 PDT 2013


            Bug ID: 16487
           Summary: Warning for uninitialized structure elements
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: echristo at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

We should get simple warnings for structure elements, e.g. here:

#include <stdio.h>
#include <stdbool.h>

struct wrapper {
  bool p;

int main(int argc, char *argv[])
    struct wrapper w;

    if ( w.p )
        puts("p is true");
        puts("p is not true");

    if ( ! w.p )
        puts("p is false");
        puts("p is not false");

    return 0;

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130628/c27ebe11/attachment.html>

More information about the llvm-bugs mailing list