This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch,avr] Fix PR80462


2017-04-19 14:43 GMT+04:00 Georg-Johann Lay <avr@gjlay.de>:
> This PR is about an incorrect warning for variables in progmem
> without initializer.  If the variable is just an alias like in
> and with -fmerge-all-constants
>
> const __flash char string1[] = "same string";
> const __flash char string2[] = "same string";
>
> this will result in an incorrect
>
> warning: uninitialized variable 'string2' put into program memory area
> [-Wuninitialized]
>
> Hence, this patch tests whether the decl is just an alias.
>
> Ok to apply?
>
> Johann
>
>         PR target/80462
>         * config/avr/avr.c (tree.h): Include it.
>         (cgraph.h): Include it.
>         (avr_encode_section_info): Don't warn for uninitialized progmem
>         variable if it's just an alias.
>


Please apply.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]