[PATCH 4/4] [gdb/build] Fix struct token odr violation
Tom Tromey
tom@tromey.com
Mon Aug 14 16:08:19 GMT 2023
>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
Tom> When building gdb with -O2 -flto I run into:
Tom> ...
Tom> /data/vries/gdb/src/gdb/c-exp.y:2450:8: warning: type 'struct token' \
Tom> violates the C++ One Definition Rule [-Wodr]
Tom> struct token
Tom> ^
Tom> /data/vries/gdb/src/gdb/d-exp.y:939:8: note: a different type is defined in \
Tom> another translation unit
Tom> struct token
Tom> ^
Tom> ...
Tom> Fix this by renaming to c_token and d_token.
Looks good.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
More information about the Gdb-patches
mailing list