-
Notifications
You must be signed in to change notification settings - Fork 31
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
Changes to allow compilation with gcc 6 #53
base: master
Are you sure you want to change the base?
Conversation
#pragma GCC diagnostic push | ||
#pragma GCC diagnostic warning "-Wdeprecated-declarations" | ||
#endif | ||
// readdir_c is deprecated as of POSIX 1.2008 but is still supported and not simple to implement the recommended usage. Make a warning for now |
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 you mean readdir_r
?
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.
Also, do we treat warnings as errors in debug mode?
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.
Please research the throw
issue.
@@ -94,6 +98,9 @@ namespace SCXCoreLib | |||
{ | |||
throw SCXErrnoException(L"pthread_mutex_destroy() function call failed", err, SCXSRCLOCATION); |
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.
Given that we do throws all over the place, I'm REALLY curious what makes this throw different than the other throws:
jeffcof:code> grep -R throw | grep -v \\throws | grep -v // | wc -l
685
jeffcof:code>
So not counting SCX or other providers, JUST the PAL, what makes this throw different from 684 other throws?
Please research this, I'd prefer fixing the code than masking the error if we can. Otherwise looks fine.
Will mark awaiting feedback to see what you determine 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.
Added a comment to explain. They are thorwing in a destructor, very poor practice. If the throw ever occurs it will panic the app
02581f5
to
4b0f3d6
Compare
Following up:
Calling throw in a destructor is bad form and will result in terminate being called. I added a comment to that effect. That code should be modified but for now it will compile
From: Jeff Coffler [mailto:notifications@github.com]
Sent: Tuesday, December 20, 2016 1:57 PM
To: Microsoft/pal <pal@noreply.github.com>
Cc: Bruce Campbell (Insight Global) <v-brucc@microsoft.com>; Author <author@noreply.github.com>
Subject: Re: [Microsoft/pal] Changes to allow compilation with gcc 6 (#53)
@jeffaco requested changes on this pull request.
Please research the throw issue.
________________________________
In source/code/scxcorelib/pal/scxcondition.cpp<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fpal%2Fpull%2F53%23pullrequestreview-13859564&data=02%7C01%7Cv-brucc%40microsoft.com%7Ce5d2d49e7771406dcc4b08d42923212b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636178678229225192&sdata=7%2Fpeg0m1lecp9L7O3xiEBNeILijB0Zl7Omrrfcbq47k%3D&reserved=0>:
@@ -94,6 +98,9 @@ namespace SCXCoreLib
{
throw SCXErrnoException(L"pthread_mutex_destroy() function call failed", err, SCXSRCLOCATION);
Given that we do throws all over the place, I'm REALLY curious what makes this throw different than the other throws:
jeffcof:code> grep -R throw | grep -v \\throws<file://throws> | grep -v // | wc -l
685
jeffcof:code>
So not counting SCX or other providers, JUST the PAL, what makes this throw different from 684 other throws?
Please research this, I'd prefer fixing the code than masking the error if we can. Otherwise looks fine.
Will mark awaiting feedback to see what you determine here.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fpal%2Fpull%2F53%23pullrequestreview-13859564&data=02%7C01%7Cv-brucc%40microsoft.com%7Ce5d2d49e7771406dcc4b08d42923212b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636178678229225192&sdata=7%2Fpeg0m1lecp9L7O3xiEBNeILijB0Zl7Omrrfcbq47k%3D&reserved=0>, or mute the thread<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FANDYQcGypwYApUrnYV693_btvF6X-REyks5rKE8sgaJpZM4LRDe0&data=02%7C01%7Cv-brucc%40microsoft.com%7Ce5d2d49e7771406dcc4b08d42923212b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636178678229225192&sdata=ALPABpE7Fa2Ig7UWuHSZKM4jYWFBw4njdblm%2F9smKtE%3D&reserved=0>.
|
4b0f3d6
to
d2bad17
Compare
Note there are still no changes to fix build with gcc 6 and default -Werror=deprecated-declarations due deprecated readdir_r using. |
Need to make changes so we can compile on ubuntu 16.10