[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] Clang compile error
From:       Olivier Goffart <ogoffart () kde ! org>
Date:       2013-08-09 13:07:52
Message-ID: 16991384.JNyT9KdT46 () gargamel
[Download RAW message or body]

On Friday 09 August 2013 14:42:00 Robert Ankeney wrote:
> I was trying to use clang to compile some Qt 5.1.0 code and came across a
> compile error when including the file QtCore/qabstractitemmodel.h.
[...]
> The error I get using clang version 3.4 (trunk 187329) is:
> 
> bar.cpp:3:14: error: friend declaration specifying a default argument must
> be a definition
>   friend int foo(int seed = 0);
>              ^
[...] 
> This code compiles fine with clang 3.3 and gcc 4.7.3.

Hi, 

clang is correct, Qt was wrong.

Previous version of clang or gcc just did not report the error as the C++ 
standard mandate.

Qt has been already fixed:  https://codereview.qt-project.org/60150

-- 
Olivier

_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic