Remove unused broken GetTypecode to allow building with GCC 8#210
Open
rebecca-palmer wants to merge 1 commit intoclMathLibraries:developfrom
Open
Remove unused broken GetTypecode to allow building with GCC 8#210rebecca-palmer wants to merge 1 commit intoclMathLibraries:developfrom
rebecca-palmer wants to merge 1 commit intoclMathLibraries:developfrom
Conversation
This template function has always been non-instantiable as char[4] to char& is an invalid conversion. Older GCC didn't notice as we never try, but in GCC 8 its existence is an error: https://gcc.gnu.org/gcc-8/porting_to.html#hypothetical-instantiation
Author
|
The Appveyor log looks like a missing dependency before it even got to my change - given the long period without commits, does it now also fail on unmodified develop? Scanning dependencies of target OpenCL |
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 template function is unused (not in any public headers and not called from within clSPARSE), and has always been non-instantiable (and hence unusable) as char[4] to char& is an invalid conversion.
Older GCC didn't notice as we never try (instantiating a class template only instantiates those member functions that are used), but in GCC 8 its existence is an error:
/build/clsparse-0.10.2.0/src/library/io/mm-reader.cpp: In member function 'char& MatrixMarketReader::GetTypecode()':
/build/clsparse-0.10.2.0/src/library/io/mm-reader.cpp:123:16: error: invalid conversion from 'char*' to 'char' [-fpermissive]
return Typecode;
^~~~~~~~
/build/clsparse-0.10.2.0/src/library/io/mm-reader.cpp:123:16: error: cannot bind rvalue '(char)((char*)(&((MatrixMarketReader*)this)->MatrixMarketReader::Typecode))' to 'char&'
An alternative to removal is to change the char & to char *. Both options build in Debian (gcc 8.2, clsparse 0.10.2.0, where this problem was previously reported), but have not been built in develop or tested anywhere.