Forgot to CC dev ---------- Forwarded message ---------- From: Rodrigo Kumpera <kump...@gmail.com> Date: Thu, Oct 30, 2014 at 1:57 PM Subject: Re: [Mono-dev] [eglib] Warning: assertion function returning To: Alex J Lennon <ajlen...@dynamicdevices.co.uk>
On Thu, Oct 30, 2014 at 12:34 PM, Alex J Lennon < ajlen...@dynamicdevices.co.uk> wrote: > Hi Rodrigo, > > On 30/10/2014 17:28, Rodrigo Kumpera wrote: > > Since the noreturn behavior is not verifiable by the compiler (it's part > of the API contract) we can a hack to silence the warning. > > > If that's what's wanted that's fine by me of course. Easily done. > > But I don't understand: Surely the fact the compiler is complaining shows > that it does know that the function is returning, when it has been told via > the attributing that the function should not? > > As a test, if I add a while(1); at the bottom of the function then the > complaint goes away as the compiler knows that the return is unreachable. > > I am guessing I am misunderstanding your point? > > More importantly, should the assertion handler return or not... ? > The problem is that the abort happens through the logging callback and that can't be verified by the compiler. Any well behaved implementation must make sure it does not return. I think adding a while (1); at the end is a good enough solution. We want the noreturn semantics there.
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list