[cfe-dev] -ferror-limit omits part of last error message
Douglas Gregor
dgregor at apple.com
Fri Jul 29 08:57:01 PDT 2011
On Jul 29, 2011, at 3:32 AM, Bjorn Reese wrote:
> Consider the following program:
>
> class Alpha {};
> class Alpha {};
>
> When compiled it will give the following reply:
>
> <output>
> error-limit.cpp:2:7: error: redefinition of 'Alpha'
> class Alpha {};
> ^
> error-limit.cpp:1:7: note: previous definition is here
> class Alpha {};
> ^
> 1 error generated.
> </output>
>
> The first messages tells us the error, and the second message contains
> additional information about the error.
>
> However, when compiled with -ferror-limit=1 we get:
>
> <output>
> error-limit.cpp:2:7: error: redefinition of 'Alpha'
> class Alpha {};
> ^
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
>
> 2 errors generated.
> </output>
>
> The additional information about the (first) error is gone.
Please file a bug and/or submit a patch. The -ferror-limit logic is clipping notes when it shouldn't.
- Doug
More information about the cfe-dev
mailing list