[cfe-dev] -ferror-limit omits part of last error message
Bjorn Reese
breese at mail1.stofanet.dk
Fri Jul 29 03:32:40 PDT 2011
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.
More information about the cfe-dev
mailing list