Build successfully with clang#100
Open
thingkingland wants to merge 1 commit intoberkeley-abc:masterfrom
Open
Conversation
Contributor
|
Thank you for the information. I just committed a changeset to address
(1). We will update (2) later.
…On 10/9/2020 1:59 PM, Thingking Land wrote:
This is for ABC source code to build successfully by clang compiler.
There are two issues.
1.
src/base/io/io.c:1470:5: error: implicit declaration of function
'unlink' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
unlink( pFileTemp );
^
The solution is to include a header
#include <unistd.h>
2. There is a warning for each file
warning: unknown warning option '-Wno-unused-but-set-variable';
did you mean
'-Wno-unused-const-variable'? [-Wunknown-warning-option]
The solution is to detect clang and do not add
-Wno-unused-but-set-variable for clang in Makefile
------------------------------------------------------------------------
You can view, comment on, or merge this pull request online at:
#100
Commit Summary
* Build successfully with clang
File Changes
* *M* Makefile
<https://github.com/berkeley-abc/abc/pull/100/files#diff-b67911656ef5d18c4ae36cb6741b7965>
(3)
* *M* src/base/io/io.c
<https://github.com/berkeley-abc/abc/pull/100/files#diff-9f943483fdbdd876eea91af90ca33257>
(1)
Patch Links:
* https://github.com/berkeley-abc/abc/pull/100.patch
* https://github.com/berkeley-abc/abc/pull/100.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#100>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI4DBXRM23XIRZF7RI65RODSJ52STANCNFSM4SKQ6ASQ>.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is for ABC source code to build successfully by clang compiler. There are two issues.
1.
The solution is to include a header
The solution is to detect clang and do not add -Wno-unused-but-set-variable for clang in Makefile