<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">Le 22/07/2017 à 15:07, Richard Smith a
écrit :<br>
</div>
<blockquote
cite="mid:CAOfiQq=PiN6Zegfn3UMuQHQhRv9or8SzU-e019JbsuyG4E5FKg@mail.gmail.com"
type="cite">
<div dir="auto">Based on the errors, I would guess that the
offsetof macro is not defined. Maybe there's something wrong
with your include path?</div>
</blockquote>
Thanks for answering, but this code compiles fine with this command
below, thus I do not understand your point on the include path?
(there is no private includes in this code)<br>
<br>
clang++-3.8 -std=c++11 bug.cpp<br>
<blockquote
cite="mid:CAOfiQq=PiN6Zegfn3UMuQHQhRv9or8SzU-e019JbsuyG4E5FKg@mail.gmail.com"
type="cite">
<div class="gmail_extra"><br>
<div class="gmail_quote">On 22 Jul 2017 3:54 am, "zosrothko via
cfe-dev" <<a moz-do-not-send="true"
href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hello CFE list<br>
<br>
Sorry to post again this post, but I am really stacked on
this problem.<br>
<br>
I have an issue compiling a small c++ program with
clang++-3.8 on Ubuntu trusty<br>
<br>
Using the joined c++ program bug.cpp, <br>
<ul>
<li>clang++-3.8 -std=c++11 bug.cpp compiles fine while</li>
<li>clang++-3.8 -std=c++11 -stdlib=libc++ bug.cpp
produces invalid compile errors.</li>
</ul>
<br>
What could be the problem and how can it be solved?<br>
<br>
TIA<br>
<br>
fandre@ubuntu-trusty-64:~/<wbr>clang$ uname -a<br>
Linux ubuntu-trusty-64 4.4.0-83-generic
#106~14.04.1-Ubuntu SMP Mon Jun 26 18:10:19 UTC 2017
x86_64 x86_64 x86_64 GNU/Linux<br>
fandre@ubuntu-trusty-64:~/<wbr>clang$ clang++-3.8
--version<br>
clang version 3.8.0-2ubuntu3~trusty4
(tags/RELEASE_380/final)<br>
Target: x86_64-unknown-linux-gnu<br>
Thread model: posix<br>
InstalledDir: /usr/bin<br>
<br>
Below is the console log<br>
<br>
fandre@ubuntu-trusty-64:~/<wbr>clang$ clang++-3.8
-std=c++11 bug.cpp<br>
fandre@ubuntu-trusty-64:~/<wbr>clang$ clang++-3.8
-std=c++11 -stdlib=libc++ bug.cpp<br>
bug.cpp:56:88: error: 'Header' does not refer to a value<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, code) == 0x01)>)> poco_...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note: declared here<br>
struct Header<br>
^<br>
bug.cpp:56:96: error: use of undeclared identifier 'code'<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, code) == 0x01)>)> poco_...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:56:111: error: type name requires a specifier or
qualifier<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, code) == 0x01)>)> poco_...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:57:88: error: 'Header' does not refer to a value<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, checksum) == 0x02)>)> p...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note: declared here<br>
struct Header<br>
^<br>
bug.cpp:57:96: error: use of undeclared identifier
'checksum'<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, checksum) == 0x02)>)> p...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:57:115: error: type name requires a specifier or
qualifier<br>
...poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, checksum) == 0x02)>)>
poco_stati...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:58:88: error: 'Header' does not refer to a value<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, id) == 0x04)>)> poco_st...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note: declared here<br>
struct Header<br>
^<br>
bug.cpp:58:96: error: use of undeclared identifier 'id'<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, id) == 0x04)>)> poco_st...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:58:109: error: type name requires a specifier or
qualifier<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, id) == 0x04)>)> poco_st...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:59:88: error: 'Header' does not refer to a value<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, seq) == 0x06)>)> poco_s...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note: declared here<br>
struct Header<br>
^<br>
bug.cpp:59:96: error: use of undeclared identifier 'seq'<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, seq) == 0x06)>)> poco_s...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:59:110: error: type name requires a specifier or
qualifier<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, seq) == 0x06)>)> poco_s...<br>
<wbr> <wbr> <wbr>
^<br>
12 errors generated.<br>
fandre@ubuntu-trusty-64:~/<wbr>clang$ cp bug.cpp ../shared<br>
fandre@ubuntu-trusty-64:~/<wbr>clang$ clang++-3.8
-std=c++11 bug.cpp<br>
fandre@ubuntu-trusty-64:~/<wbr>clang$ clang++-3.8
-std=c++11 -stdlib=libc++ bug.cpp<br>
bug.cpp:56:88: error: 'Header' does not refer to a value<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, code) == 0x01)>)> poco_...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note: declared here<br>
struct Header<br>
^<br>
bug.cpp:56:96: error: use of undeclared identifier 'code'<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, code) == 0x01)>)> poco_...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:56:111: error: type name requires a specifier or
qualifier<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, code) == 0x01)>)> poco_...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:57:88: error: 'Header' does not refer to a value<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, checksum) == 0x02)>)> p...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note: declared here<br>
struct Header<br>
^<br>
bug.cpp:57:96: error: use of undeclared identifier
'checksum'<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, checksum) == 0x02)>)> p...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:57:115: error: type name requires a specifier or
qualifier<br>
...poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, checksum) == 0x02)>)>
poco_stati...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:58:88: error: 'Header' does not refer to a value<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, id) == 0x04)>)> poco_st...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note: declared here<br>
struct Header<br>
^<br>
bug.cpp:58:96: error: use of undeclared identifier 'id'<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, id) == 0x04)>)> poco_st...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:58:109: error: type name requires a specifier or
qualifier<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, id) == 0x04)>)> poco_st...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:59:88: error: 'Header' does not refer to a value<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, seq) == 0x06)>)> poco_s...<br>
<wbr> <wbr>
^<br>
bug.cpp:45:9: note: declared here<br>
struct Header<br>
^<br>
bug.cpp:59:96: error: use of undeclared identifier 'seq'<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, seq) == 0x06)>)> poco_s...<br>
<wbr> <wbr> <wbr>
^<br>
bug.cpp:59:110: error: type name requires a specifier or
qualifier<br>
typedef
poco_static_assert_test<<wbr>sizeof(POCO_STATIC_ASSERTION_<wbr>FAILURE<(bool)
(offsetof(Header, seq) == 0x06)>)> poco_s...<br>
<wbr> <wbr> <wbr>
^<br>
12 errors generated.<br>
fandre@ubuntu-trusty-64:~/<wbr>clang$<br>
<br>
</div>
<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a moz-do-not-send="true"
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev"
rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>