coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -Werror=suggest-attribute=pure breakage


From: Jim Meyering
Subject: Re: -Werror=suggest-attribute=pure breakage
Date: Fri, 08 Jul 2011 20:49:29 +0200

Pádraig Brady wrote:
> $ gcc --version
> gcc (GCC) 4.6.0 20110509 (Red Hat 4.6.0-7)
>
> $ make
> test.c:95:1: error: function might be candidate for attribute 'pure'
> if it is known to return normally [-Werror=suggest-attribute=pure]
>
> As far as I can see the advance() function is not pure
> as it updates the global variable 'pos'.

Right.
When I discovered that, I started using a version of gcc
built from the latest in git/svn ;-)

I've just confirmed that it's still a problem with the latest from F15:

    gcc version 4.6.0 20110530 (Red Hat 4.6.0-9) (GCC)

but not with this:

    gcc version 4.7.0 20110703 (experimental) (GCC)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]