This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [middle-end] New option Wsuggest-attribute=const|pure


2010/4/26 Jan Hubicka <hubicka@ucw.cz>:
>> >> Thanks for the clarification. ?Given that, I would suggest to just
>> >>
>> >> ? ? "it is known to return normally"
>> ? ? ? ? ? ^
>>
>> Sorry, there is a missing "if" -- as it was in the original diagnostic.
>
> I would be happy about pretty much any wording. GCC is able to work out quite
> safely all reasons for function not being pure/const (i.e. that it traps, or
> writes/reads memory or has dubious asm inside etc.). ?Only property we are not
> good on guessing is finiteness of the function (i.e. the halting problem).
> This is what the message is about: user has to decide if he really intend to
> make the function to loop forwever without a side effects or if the program
> is sane ;)

:-)

If you are happy with

    "if it is known to return normally"

then, the patch is OK.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]