On 9/7/2021 3:43 AM, Martin Liška wrote:
Hi.
I'm planning some refactoring related to 'section *' and I noticed we
have
quite ugly mask definitions (of form 1UL << N), where SECTION_FORGET
is unused
and
#define SECTION_STYLE_MASK 0x600000 /* bits used for SECTION_STYLE */
Is actually OR of 2 other values. What about making that a standard
enum value
with 1UL << N values?
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
Ready to be installed?
Thanks,
Martin
gcc/ChangeLog:
* output.h (enum section_flag): New.
(SECTION_FORGET): Remove.
(SECTION_ENTSIZE): Make it (1UL << 8) - 1.
(SECTION_STYLE_MASK): Define it based on other enum
values.
* varasm.c (switch_to_section): Remove unused handling of
SECTION_FORGET.
OK
jeff