On Sat, Jun 29, 2019 at 10:31 AM Bruno Haible wrote:
> Pip Cet wrote:
> > I would like to state that the current assume does
> > behave very badly when combined with -fno-inline-small-functions
> > -fno-inline.
>
> Since we can't address this limitation throu
On Sat, Jun 29, 2019 at 5:31 PM Paul Eggert wrote:
> >> This is not a valid use of 'assume'. It's documented that assume's argument
> >> should be free of side effects.
> >
> > But the compiler makes no such assumption
>
> Sure, but if the caller uses 'assume' contrary to its documentation, that's
On Sat, Jun 29, 2019 at 5:41 AM Paul Eggert wrote:
> Pip Cet wrote:
> >eassume (global == 0);
> >eassume (f ());
> > #else
> >eassume (global == 0 && f ());
> > ...
> > extern int global;
> >
> > int f(void)
> > {
>
On Fri, Jun 28, 2019 at 11:30 PM Bruno Haible wrote:
> Pip Cet wrote:
> > have started believing the "an inline function is as fast as a macro"
> > mantra*, assuming you include inline functions with "function calls".
>
> Ah, that's where the enti
> OptionsResult
> none increment
> -DASSUME_GNULIBincrement
> -DTWO_ASSUMES single-store
> -DASSUME_GNULIB -DTWO_ASSUMES increment
Thanks, I should have included that. However, please note that in the
-DA
On Fri, Jun 28, 2019 at 7:11 PM Bruno Haible wrote:
> Pip Cet wrote:
> > Sorry, can't reproduce that here. I'm sure the changes I need to make
> > are obvious once I've found them, but can you let me know your gcc
> > version?
>
> I reproduce this with GC
On Fri, Jun 28, 2019 at 5:46 PM Paul Eggert wrote:
> Pip Cet wrote:
> > It's way too easy
> > to do something like
> >
> > eassume(ptr->field >= 0 && f(ptr));
> >
> > when what you mean is
> >
> > eassume(ptr->field >= 0
On Fri, Jun 28, 2019 at 12:14 PM Bruno Haible wrote:
> Pip Cet wrote:
> > This makes it safe to use function expressions in eassume, whether the
> > function is inlined or not.
>
> By "safe" you mean that you want the function call to not be evaluated.
Sorry, slo
On Thu, Jun 27, 2019 at 11:45 PM Bruno Haible wrote:
> Can you please show an example code on which the change makes a difference?
int main(void)
{
eassume (printf("hi\n"));
return 0;
}
Or, more realistically:
extern int potentially_inlined_function(int i);
int main(void)
{
...
eassume
On Thu, Jun 27, 2019 at 9:13 PM Paul Eggert wrote:
> On 6/27/19 12:56 PM, Pip Cet wrote:
> > The eassume tells GCC i is nonnegative, since (!(i >= 0) == !(i >= 0))
> > is indeed a constant.
>
> Ah! Thanks, I didn't catch that subtle point. Would the attached
10 matches
Mail list logo