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


On Sun, Apr 25, 2010 at 3:56 PM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Sun, Apr 25, 2010 at 10:52 PM, Gabriel Dos Reis
> <gdr@integrable-solutions.net> wrote:
>> On Sun, Apr 25, 2010 at 3:42 PM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>> On Sun, Apr 25, 2010 at 9:47 PM, Gabriel Dos Reis
>>> <gdr@integrable-solutions.net> wrote:
>>>> On Sat, Apr 24, 2010 at 9:47 AM, Manuel López-Ibáñez
>>>> <lopezibanez@gmail.com> wrote:
>>>>> On 24 April 2010 01:41, Gabriel Dos Reis <dosreis@gmail.com> wrote:
>>>>>> On Fri, Apr 23, 2010 at 1:28 PM, Manuel López-Ibáñez
>>>>>> <lopezibanez@gmail.com> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> This is an updated version of the patch submitted by Jan almost one year ago.
>>>>>>>
>>>>>>> http://gcc.gnu.org/ml/gcc-patches/2009-07/msg00124.html
>>>>>>>
>>>>>>> I dropped the controversial nothrow bits and (hopefully) addressed all
>>>>>>> the remainder comments.
>>>>>>>
>>>>>>> Bootstrapped and regression tested on x86_64-linux-gnu.
>>>>>>>
>>>>>>> OK for trunk?
>>>>>>
>>>>>> I like this version much better. ?However,
>>>>>>
>>>>>> ? ?"if it is known to be finite"
>>>>>>
>>>>>> is too obscure for most users not expert in GCC-IPA internals.
>>>>>> I don't know what is meant by that, but it needs to be improved/clarified.
>>>>>
>>>>> It also rings a bit obscure to me. Suggestions?
>>>>
>>>> Hmm, I confess I do not understand what was originally meant by "being finite"
>>>> when we are talking about a function.
>>>> I would appreciate a clarification from a middle-end expert.
>>>
>>> "being finite" means that the function is guaranteed to return
>>> normally. ?That means it doesn't contain an infinte loop nor
>>> returns abnormally by throwing or calling abort() or traps or ...
>>>
>>> Is there a better term for this property?
>>
>> 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.

>>
>> in the diagnostic
>
> Do you think that makes it clear that
>
> ?void foo (unsigned n)
> ?{
> ? ?unsigned i;
> ? ?for (i = n; i>=0; --i)
> ? ? ?;
> ?}
>
> is not returning normally if n can be zero? ?Thus, does
> "it is known to return normally" suggest that it _has_ to return
> or only that if it returns it returns normally?

only "if it returns normally", the "if" was missing in my reply.

-- Gaby


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