fixed compile error for gcc 11.4#7
Closed
pletzer wants to merge 2 commits into
Closed
Conversation
Collaborator
Author
|
The above fix causes a seg fault. It is necessary to move back to version 13.1 of admb. |
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.
With gcc 11.4 I get the following error:
src/seapodym_coupled.cpp: In function ‘void verify_identifier_string2(char*)’:
src/seapodym_coupled.cpp:621:29: error: cannot call member function ‘DF_FILE* gradient_structure::get_fp()’ without object
621 | gradient_structure::get_fp()->fread(str,num_bytes);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
src/seapodym_coupled.cpp: In function ‘int save_identifier_string2(char*)’:
src/seapodym_coupled.cpp:646:29: error: cannot call member function ‘DF_FILE* gradient_structure::get_fp()’ without object
646 | gradient_structure::get_fp()->fwrite(str,length);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
src/seapodym_coupled.cpp: In function ‘void save_long_int_value(long unsigned int)’:
src/seapodym_coupled.cpp:654:29: error: cannot call member function ‘DF_FILE* gradient_structure::get_fp()’ without object
654 | gradient_structure::get_fp()->fwrite(y,num_bytes);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
src/seapodym_coupled.cpp: In function ‘long unsigned int restore_long_int_value()’:
src/seapodym_coupled.cpp:661:29: error: cannot call member function ‘DF_FILE* gradient_structure::get_fp()’ without object
661 | gradient_structure::get_fp()->fread(&tmpout,num_bytes);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
make: *** [Makefile:151: objs/seapodym_coupled.o] Error 1
(
I think gradient_structure::get_fp() should be replace with gradient_structure().get_fp()