This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/67279] New: -fsanitize=undefined spurious error: initializer element is not constant


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67279

            Bug ID: 67279
           Summary: -fsanitize=undefined spurious error: initializer
                    element is not constant
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zeccav at gmail dot com
  Target Milestone: ---

/* gcc -fsanitize=undefined issues spurious error message */
/* OK without sanitizer */
/* Target: x86_64-unknown-linux-gnu */
void test(void)
{
        int dec_good = 1 << 31; /* good */
 static int dec_BAD  = 1 << 31; /* error: initializer element is not constant*/
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]