[cfe-users] Converting a function name to boolean

Dmitri Gribenko gribozavr at gmail.com
Thu May 2 11:07:16 PDT 2013


On Thu, May 2, 2013 at 7:41 PM, Shriramana Sharma <samjnaa at gmail.com> wrote:
> Please examine the attached C++ test program which includes the Clang
> vs GCC (4.7.3-1ubuntu1) outputs too. Since Clang is far stricter with
> the standard than GCC I've been using it to compile my projects and it
> recently gave this error "reference to non-static member function must
> be called", based on which I made up this testcase.

Hi,

Looks like our attempt to recover from an error leads to a bad
diagnostic.  You can file a bug for a bad diagnostic at
http://llvm.org/bugs/

Dmitri

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-users mailing list