Article 543RF Q: g++ ignore const keyword in parameter declarations

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
Michaellatest?d=yIl2AUoC8zA latest?i=8RMVekcSyJ0:iIQDL21iDDA:F7zBnMy latest?i=8RMVekcSyJ0:iIQDL21iDDA:V_sGLiP latest?d=qj6IDK7rITs latest?i=8RMVekcSyJ0:iIQDL21iDDA:gIN9vFw8RMVekcSyJ0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments