-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid duplicate "warning:" or "error:" output #1359
Conversation
Uhoh, lots of regressions check for "CONVERSION ERROR". Not clear whether to change the tests or do a special case for that. |
Assigning to myself for further work at a later time. No urgency/dependency here for anyone. |
ff8217a
to
ff59fa7
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1359 +/- ##
===========================================
- Coverage 78.38% 78.23% -0.15%
===========================================
Files 1720 1720
Lines 187982 188342 +360
Branches 18474 18466 -8
===========================================
+ Hits 147346 147353 +7
- Misses 40636 40989 +353 ☔ View full report in Codecov by Sentry. |
I have revamped this PR, and none of the "CONVERSION ERROR" messages should be affected. It's really just to avoid "warning: warning: " being printed to users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much respect for resolving a 2017 issue!
220ba7d
to
6263492
Compare
6263492
to
0ef65f8
Compare
Closing due to age (no further comment on PR content), please reopen with rebase on develop if you intent to continue this work. |
Re-opening: this is just waiting for a review. |
0ef65f8
to
d0bc9d3
Compare
@remi-delmas-3000 @kroening Woulda review be possible? |
d0bc9d3
to
5af219a
Compare
5af219a
to
5b611b2
Compare
|
||
/// With \p yes set to \c true, prefix warnings with an error message. | ||
/// \param yes: Whether or not to prefix warnings. | ||
void print_warnings_as_errors(bool yes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say it depends on how closely we'd like to mimic the behaviour of Visual Studio and GCC. Prior to this change, we just printed "warning" but nonetheless failed with a non-zero exit code when Werror
was used. With this change, we would actually print "error" for such now-fatal warnings, as those compilers do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels a bit cosmetic, but why not.
5b611b2
to
0b725d3
Compare
The gcc and cl message handlers already take care of this, and we had a mix of some messages including the "warning:" or "error:" prefix when others don't.
…y to warning We already did this for GCC, but we can also do this for other modes (ARMCC, CodeWarrior, LD, CL, LINK).
We already treated warnings as errors (if requested via command-line options), but we should also mimic the output presented by CL/GCC with those command-line options set.
0b725d3
to
613289b
Compare
The gcc message handler already took care of this; make the console message
handler do the same.