8000 Disable clang error on narrowing conversions. by IvanVergiliev · Pull Request #281 · clMathLibraries/clBLAS · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Disable clang error on narrowing conversions. #281

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

Merged
merged 1 commit into from
Aug 3, 2016

Conversation

IvanVergiliev
Copy link
Contributor
@IvanVergiliev IvanVergiliev commented Aug 2, 2016

clang with -std=c++11 fails to compile the project because there are narrowing conversions in src/library/blas/xtrsm.cc and a bunch of other files. The problem is reproducible for me if instead of

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing")

I set

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

Disabling the error seems like the easiest solution. Another alternative is to add explicit casts, but it touched multiple places in the code so I figured that this is the safer path.

Also, having an explicit section with compile options for clang may save some confusion - I spent quite a bit of time wondering why my CXXFLAGS are not respected until I realized that clang is not considered a GNUCXX compiler so the first if does not apply to it.


This change is Reviewable

@kknox kknox merged commit 11b0270 into clMathLibraries:develop Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0