Q: g++ ignore const keyword in parameter declarations
by Michael Uplawski from LinuxQuestions.org on (#543RF)
Situation: Compiling a source-package I am confronted with numerous ambiguities where the extern declaration of a library-function misses the const keyword in a parameter-list.
What I want: I do not care and also want to prevent the compiler from bailing out at size_t-int-confusions. As all extern declarations are in one single header of the source-package in question, I can choose to backup the file and create my own version with all the needed const keywords added. But this is cumbersome, as the compiler never reports all those problems at once, but needs to be started anew after each single correction", then chokes on the next missing const.
Also, as the package will be updated from git, rather regularly, I do not want to remember my private changes, nor clone or otherwise maintain" the code or revert my changes prior updates.
Question: I may have forgotten or never knew of the right compiler-flag, -if there is one-, which could help me overcome these hurdles in one go.
TIA
Michael


What I want: I do not care and also want to prevent the compiler from bailing out at size_t-int-confusions. As all extern declarations are in one single header of the source-package in question, I can choose to backup the file and create my own version with all the needed const keywords added. But this is cumbersome, as the compiler never reports all those problems at once, but needs to be started anew after each single correction", then chokes on the next missing const.
Also, as the package will be updated from git, rather regularly, I do not want to remember my private changes, nor clone or otherwise maintain" the code or revert my changes prior updates.
Question: I may have forgotten or never knew of the right compiler-flag, -if there is one-, which could help me overcome these hurdles in one go.
TIA
Michael