On Mon, 10 Mar 2025 19:10:26 +0100
Richard Biener <richard.guent...@gmail.com> wrote:

> > What is the right answer?  Designated initializers are part of C99,
> > but weren't added to C++ until C++20
> > (https://en.cppreference.com/w/cpp/language/initialization).
> > Strictly speaking, we should remove all of them, because our
> > baseline is C++14.
> 
> Yes.

I have completed work on this, where "completed" means "9 tests fail".  Bob and 
I are looking into why, because of course my changes weren't meant to change 
anything.  

The changes include

1.  remove VLAs in favor of std::vector
2.  write contructors for classes containing unions
3.  eliminate use of designated initializers
4.  cast pointers formatted with %p as (void*)
5.  ignore -Wpedantic where 128-bit types are used
6.  eliminate compound literals
7.  eliminate case ranges

The result compiles without warning using -std=c++14 -Wpedantic, which are now 
part of the options set in gcc/cobol/Make-lang.in.  We're currently using 
CPPFLAGS for that.  IIUC that needs to be changed to LTsomethingFLAGS, which 
will happen in due course.  

Once we fix the breakage and I get myself re-oriented to use the gcc git 
repository, I will apply the changes.  

--jkl

Reply via email to