[Bug 209467] devel/llvm37: clang++37 behaves differently on 9.3 and 10.3

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu May 12 16:15:10 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209467

            Bug ID: 209467
           Summary: devel/llvm37: clang++37 behaves differently on 9.3 and
                    10.3
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: brooks at FreeBSD.org
          Reporter: yuri at rawbw.com
             Flags: maintainer-feedback?(brooks at FreeBSD.org)
          Assignee: brooks at FreeBSD.org

Using the same package, clang++NN successfully compiles test.cc on 10.3 and
fails on 9.3. This is true for clang++34, clang++37 and probably for all of
clang++NN. This is also true for clang-3.4.1 in the bases of 9.3 and 10.3.

The same version of compiler should compile the same standalone C/C++ code the
same way, regardless of the OS version.


--program test.cc---
#include <limits>

int main() {
  const int vmax = std::numeric_limits<int>::max();
  static_assert(vmax>0, "");
}

---command---
clang++37 -std=c++11 -c test.cc

---error on 9.3---
test.cc:6:17: error: static_assert expression is not an integral constant
expression
  static_assert(vmax>0, "");
                ^~~~~~
test.cc:6:17: note: initializer of 'vmax' is not a constant expression
test.cc:5:13: note: declared here
  const int vmax = std::numeric_limits<int>::max();
            ^
1 error generated.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list