[PATCH 4/7] gdb: Introduce stabs_debuginfo_reader

Guinevere Larsen guinevere@redhat.com
Fri Dec 20 20:07:08 GMT 2024


On 12/20/24 1:38 PM, Tom Tromey wrote:
>>>>>> "Guinevere" == Guinevere Larsen <guinevere@redhat.com> writes:
> Guinevere> +	  stabs_reader_context ctx = {
> Guinevere> +	    .sections = *info->stabsects,
> Guinevere> +	    .stabstroffset = info->stabstrsect->filepos,
> Guinevere> +	    .textaddr = info->textaddr,
> Guinevere> +	    .textsize = info->textsize,
> Guinevere> +	    .stabstrsize = stabstrsize,
> Guinevere> +	    .coff_file = true,
>
> I think designated initializers are only available starting in C++20.
>
> Tom
>
Oh, I thought this was used by riscv already, but it seems I 
misremembered. it's in comments...

On the other hand, I just tried a very simple test program, and both g++ 
and clang compile it with --std=c++17, so long as I keep the order the 
same as declaration order.

If you want to go by what the standards say, not what gcc/clang do, I  
can do what riscv did and add comments around these until we get to c++20

-- 
Cheers,
Guinevere Larsen
She/Her/Hers



More information about the Gdb-patches mailing list