[PATCH 05/11] gas: pre-init the scrubber's lex[]
Jan Beulich
jbeulich@suse.com
Mon Jul 1 06:02:29 GMT 2024
On 01.07.2024 03:45, Hans-Peter Nilsson wrote:
> On Fri, 28 Jun 2024, Jan Beulich wrote:
>> +static char lex[256] = {
>> + [' '] = LEX_IS_WHITESPACE,
>> + ['\t'] = LEX_IS_WHITESPACE,
>> + ['\r'] = LEX_IS_WHITESPACE,
>> + ['\n'] = LEX_IS_NEWLINE,
>> + [':'] = LEX_IS_COLON,
>> + ['$'] = LEX_IS_SYMBOL_COMPONENT,
>> + ['.'] = LEX_IS_SYMBOL_COMPONENT,
>> + ['_'] = LEX_IS_SYMBOL_COMPONENT,
>> + ['A' ... 'Z'] = LEX_IS_SYMBOL_COMPONENT,
>> + ['a' ... 'z'] = LEX_IS_SYMBOL_COMPONENT,
>> + ['0' ... '9'] = LEX_IS_SYMBOL_COMPONENT,
>> + [128 ... 255] = LEX_IS_SYMBOL_COMPONENT,
>
> That "..." initializer thingy is a GCC GNU extension.
> Cf. GCC docs. You probably don't want to do that.
Oh, you're right. I got so used to using it that I've been under the wrong
impression that only the case label use of ... is an extension. Will undo
of course (I had it spelled out first); thanks for pointing out.
Jan
More information about the Binutils
mailing list