[cfe-dev] 'const void' is considered to be an incomplete type by clang 3.5.0
Hal Finkel
hfinkel at anl.gov
Mon Apr 21 12:07:36 PDT 2014
----- Original Message -----
> From: "Yuri" <yuri at rawbw.com>
> To: cfe-dev at cs.uiuc.edu
> Sent: Monday, April 21, 2014 1:58:34 PM
> Subject: [cfe-dev] 'const void' is considered to be an incomplete type by clang 3.5.0
>
> I tried to compile some Qt5 project with the latest clang-3.5.0
> (rev.206727) and got this error:
>
> ../../../../../local/include/qt5/QtCore/qmetatype.h|1319 col 27|
> error:
> invalid application of 'sizeof' to an incomplete type 'const void'
> || Q_STATIC_ASSERT_X(sizeof(T), "Type argument of
> Q_DECLARE_METATYPE(T*) must be fully defined");
>
> This message, as it is worded, isn't valid because 'const void' isn't
> 'incomplete'.
What do you mean? As I understand it, void is always incomplete. What do you expect sizeof(const void) to return?
-Hal
> This error was triggered by the templated class
> (template<typename T> struct IsPointerToTypeDerivedFromQObject<T*>)
> instantiated with the template argument T=const void.
>
> clang-3.3 didn't have such issue.
>
> Many Qt users will see this error, because this code is in a very
> common
> qt include file.
>
> Yuri
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the cfe-dev
mailing list