[llvm-bugs] [Bug 33723] New: Invalid compiler error: bug.cpp:38:88: error: 'Header' does not refer to a value

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jul 9 11:23:13 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33723

            Bug ID: 33723
           Summary: Invalid compiler error: bug.cpp:38:88: error: 'Header'
                    does not refer to a value
           Product: clang
           Version: 3.6
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zosrothko at orange.fr
                CC: llvm-bugs at lists.llvm.org

Created attachment 18768
  --> https://bugs.llvm.org/attachment.cgi?id=18768&action=edit
The c++ source code

Hi
>From my understanding, the bug.cpp source code joined as attachment should
compile without any error as gcc-5.4.0 compiles it without error.

Below the clang compiler's log
fandre at ubuntu-trusty-64:/mnt/shared/poco-c++11/Net$ clang++-3.6 -stdlib=libc++
bug.cpp -std=c++11
bug.cpp:39:88: error: 'Header' does not refer to a value
 typedef poco_static_assert_test<sizeof(POCO_STATIC_ASSERTION_FAILURE<(bool)
(offsetof(Header, code) == 0x01)>)> poco_static_assert...
                                                                               
       ^
bug.cpp:28:9: note: declared here
 struct Header
        ^
bug.cpp:39:96: error: use of undeclared identifier 'code'
 typedef poco_static_assert_test<sizeof(POCO_STATIC_ASSERTION_FAILURE<(bool)
(offsetof(Header, code) == 0x01)>)> poco_static_assert...
                                                                               
               ^
bug.cpp:39:111: error: type name requires a specifier or qualifier
 typedef poco_static_assert_test<sizeof(POCO_STATIC_ASSERTION_FAILURE<(bool)
(offsetof(Header, code) == 0x01)>)> poco_static_assert...
                                                                               
                              ^
bug.cpp:40:88: error: 'Header' does not refer to a value
 typedef poco_static_assert_test<sizeof(POCO_STATIC_ASSERTION_FAILURE<(bool)
(offsetof(Header, checksum) == 0x02)>)> poco_static_as...
                                                                               
       ^
bug.cpp:28:9: note: declared here
 struct Header


Below the gcc-5.4.1 log
fandre at ubuntu-trusty-64:/mnt/shared/poco-c++11/Net$ g++ bug.cpp -std=c++11 -c
fandre at ubuntu-trusty-64:/mnt/shared/poco-c++11/Net$
fandre at ubuntu-trusty-64:/mnt/shared/poco-c++11/Net$ g++ --version
g++ (Ubuntu 5.4.1-2ubuntu1~14.04) 5.4.1 20160904
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

fandre at ubuntu-trusty-64:/mnt/shared/poco-c++11/Net$ clang-3.6 --version
Ubuntu clang version 3.6.0-2ubuntu1~trusty1 (tags/RELEASE_360/final) (based on
LLVM 3.6.0)
Target: x86_64-pc-linux-gnu
Thread model: posix

-- 
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/20170709/0eaf26c0/attachment-0001.html>


More information about the llvm-bugs mailing list