Re: [PATCH] varasm: Two SECTION_RETAIN fixes [PR100130]

2021-04-20 Thread Jeff Law via Gcc-patches
On 4/19/2021 3:21 AM, Richard Sandiford via Gcc-patches wrote: switch_to_section warns if we try to output a retain decl in a section without a retain flag, or if we try to output a non-retain decl in a section with a retain flag. However, the warning only applied if we were trying to “switch”

[PATCH] varasm: Two SECTION_RETAIN fixes [PR100130]

2021-04-19 Thread Richard Sandiford via Gcc-patches
switch_to_section warns if we try to output a retain decl in a section without a retain flag, or if we try to output a non-retain decl in a section with a retain flag. However, the warning only applied if we were trying to “switch” to the current section. This works if all decls that use a section