[petsc-dev] PETSc blame digest (next) 2015-04-08

William Gropp wgropp at illinois.edu
Wed Apr 8 10:19:50 CDT 2015


Yes, compilers are buggy.

The issue is whether you want to be a slave to some compilers buggy warning code.  I know many people are trained to be such slaves, and I understand the desire for a “clean” build, but I prefer to exercise judgement :)

Bill

On Apr 8, 2015, at 10:16 AM, Jed Brown <jed at jedbrown.org> wrote:

> Matthew Knepley <knepley at gmail.com> writes:
> 
>> On Wed, Apr 8, 2015 at 9:43 AM, Jed Brown <jed at jedbrown.org> wrote:
>> 
>>> Matthew Knepley <knepley at gmail.com> writes:
>>>> I think you need an if () to make the compiler quit whining.
>>> 
>>> if what?  if (1)?  Seems pointless.
>>> 
>> 
>> if (!link) SETERRQ();
>> 
>> The compiler will not be able to reason about that and the cannot know that
>> the return is not reached.
> 
> That is the exit condition of the preceding loop, so it would be a bug
> in the compiler's reachability analysis if it did not do that analysis.




More information about the petsc-dev mailing list