-
Notifications
You must be signed in to change notification settings - Fork 252
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
Coverage #303
base: master
Are you sure you want to change the base?
Coverage #303
Conversation
and a few log messages reowkr the -pipe in conjunction with -save-temps
though need to get rid of all using namespace std is better but for another commit
@@ -55,7 +55,7 @@ if test "$GCC" = yes; then | |||
-Wshadow -Wpointer-arith $cast_align -Wwrite-strings \ | |||
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes \ | |||
-Wnested-externs $CFLAGS" | |||
CXXFLAGS=" -g -W -Wall -Wpointer-arith $cast_align $wshadow -Wwrite-strings $CXXFLAGS" | |||
CXXFLAGS=" -std=gnu++11 -g -W -Wall -Wpointer-arith $cast_align $wshadow -Wwrite-strings $CXXFLAGS" |
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.
This is okay, but I would prefer a minimum level of this, while allowing higher standards if the compiler supports it... (I'm working on cmake which handles this easier than autotools this so don't worry about it)
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.
yeah just the code get so much nicer ... for the for () loops
I can rewrite it the old way ... and remove if you want
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.
No, I'm saying that if C++14 is available I want to use that instead of C++11.
I'm not sure how far back we want to support C++ standards, maybe the next release should require C++11, and C++17 for the one after 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.
My vote would be c++ 14 for the next release, and 17 after that. For what it's worth, I've seen several areas of code that could profit from string_view in C++ 17.
daemon/main.cpp
Outdated
@@ -602,7 +602,7 @@ bool Daemon::setup_listen_fds() | |||
|
|||
myaddr.sun_family = AF_UNIX; | |||
|
|||
mode_t old_umask = -1U; | |||
mode_t old_umask = (mode_t)-1U; |
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.
odn't use C style cases - I think you want static_cast here?
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.
yes, personally I jut hate the extra typing :)
daemon/workit.cpp
Outdated
|
||
// we could ignore this, except the silly gcc-4.8 thing with tthe caret fails the tests due |
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.
tthe - fix the typo in this comment
daemon/workit.cpp
Outdated
|
||
// we could ignore this, except the silly gcc-4.8 thing with tthe caret fails the tests due | ||
// to having -pipe and -save-temps=obj | ||
for (std::list<string>::const_iterator it = list.begin(); |
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.
why didn't you use auto here?
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.
just copied the line below it ...
was sort of last minute, I didn't have this fix in my original since I don't use 4.8 normally but it happened to be on the box I was using
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.
problem was the test failed since it got some stderr and the 4.8 thing
but didn't actually error (even with -Werror), normally for my setup it just kept going ...
gcc: warning: -pipe ignored because -save-temps specified
I was looking at the fix in my setup to just clean it up but figured its so rarely used ... I didn't care (till the test failed)
It looks good on first glance. I see some minor style issues. I'll need to look at it a little longer, but thanks for the work. I'll want @johnmiked15 to look at it too to make sure I'm not missing something, if he is still around |
This fixes #187 |
one issue is the API not sure how to handle that .. (just bump API on new enum?) and ensure checked in minVersion? |
and static cast on broken mode_t for mac/c++ vs C-cast
Would it be possible to send to the remote a list of files to send back? Then the version 38 clients are compatible with new file types. Otherwise just put a comment by the enum that you need to update the protocol version when the enum changes. |
unfortunately that doesn't help (I did something myself adding a custom/API version so that if I added messages on my own I don't pollute the API space on new update from git |
client/arg.cpp
Outdated
@@ -720,6 +726,23 @@ bool analyse_argv(const char * const *argv, CompileJob &job, bool icerun, list<s | |||
|
|||
job.setFlags(args); | |||
job.setOutputFile(ofile); | |||
if (seen_split_dwarf) { | |||
// need to do after the output file is set */ |
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.
remove the c style comment end - this is a C++ comment
tests/test.sh
Outdated
abort_tests | ||
fi | ||
fi | ||
# note thiese differ a bit based on the args passed to compiler |
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.
spelling - thiese-> these
services/job.h
Outdated
|
||
void setExtraOutputFile(uint32_t index, const std::string &file) | ||
{ | ||
//printf("setExtraOutputFile[%d] = %s\n", index, file.c_str()); |
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.
dead code, please remove, or use the standard logging means to log this
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.
will do these, just been away
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.
3 comments need tweaking. Since nobody else has look at this in a week I'll merge as soon as they are fixed unless someone sees something wrong I don't.
I tried to rebase these commits against master in (https://github.com/dantje/icecream/commits/coverage) and got this to compile and at least it claims to transmit gcno files. |
I'm going to look into this during the next week or so and see if I can revive it. At this point (years later), I think we should just go for C++17, so I'll see if I can go in that direction - though I would like to keep GNU extensions out of it if I can. |
add extra_file support for code coverage and save_temps
merge split dwarf into that setup
should be backward compatible
added tests for various combinations of the extra files