[PATCH] gdb: ignore -Wregister instead of -Wdeprecated-register

Simon Marchi simark@simark.ca
Mon Apr 8 02:58:57 GMT 2024



On 2024-04-06 10:40, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
> 
> Simon> In ada-lex.l, we already use `DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER`,
> Simon> which for Clang translates to ignoring `-Wdeprecated-register` [1].  I think
> Simon> that was produced when compiling as C++11, but now that we always compile as
> Simon> C++17, Clang produces a `-Wregister` error [2].
> 
>>>> Can we just '#define register' in this file or somewhere nearby?
> 
>>> We probably can, but ignoring the diagnostic seems safer and less hacky
>>> to me.
> 
> Simon> Just stumbled on this.  Are you ok with the current patch, or would you
> Simon> really prefer the #define approach?
> 
> It's fine if you want to do it.  I should really finish my rewrite of
> this lexer.  IMO flex causes more problems than it solves.
> 
> Tom

Ok, thanks, pushed.

Simon


More information about the Binutils mailing list