Moments ago I pushed the "CDF update" for gcc/cobol. This addresses, hopefully solves, the ODR violations cited in PR 119215 by wrapping Bison output in a C++ namespace.
The price of progress sadly is that Bison 3.8.2 is now a requirement. That is the latest released version, now almost 5 years old. The upgrade is necessary because older versions do not support C++ in the same way, and C++ is what is needed to place the generated code in a C++ namespace. The emitted C++ code also uses std::iostream to format diagnostic messages. The Bison input gcc/cobol/cdf.y includes the iostream header file and does not include any gcc headers. Hopefully that dodges any conflict with the rest of the system. If not, at least we have a working baseline, sort of. I chose this route because ISTM it is the best option. Namespaces are the remedy to ODR errors in LTO, and Bison offers direct namespace support if the output is designated as (not just compiled as) C++. The commit does not update gcc/docs/install.texi with the new requirement. I'll remedy that shortly. Several PRs, either technical or language-related, have been pending against this change. Once the dust settles I hope to make progress on them. --jkl
