Re: [PATCH] fix -fmax-errors & notes, take 2

2016-12-05 Thread Nathan Sidwell
On 12/02/2016 09:07 AM, Bernd Schmidt wrote: Arguments should be documented. I really must get into the habit of adding FIXME when writing dev comments. + if (count >= (int) context->max_errors) Looks like there are some unnecessary type mismatches leading to this cast. Maybe declare

Re: [PATCH] fix -fmax-errors & notes, take 2

2016-12-02 Thread Bernd Schmidt
On 12/02/2016 02:25 PM, Nathan Sidwell wrote: +/* Check if we've met the maximum error limit. */ Arguments should be documented. +void +diagnostic_check_max_errors (diagnostic_context *context, bool flush) +{ + if (!context->max_errors) +return; I prefer to spell that as != 0 since

[PATCH] fix -fmax-errors & notes, take 2

2016-12-02 Thread Nathan Sidwell
Hi, this respin of my notes patch from October (https://gcc.gnu.org/ml/gcc-patches/2016-10/msg00706.html) addresses the fortran problems encountered. I introduced a new function and call it from the fortran error machinery at an appropriate point. ok? nathan -- Nathan Sidwell 2016-12-02