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] mips: Allow larger values for __aligned__


> -I../libdecnumber    /home/eric/gnat/gnat6/src/gcc/tree-vectorizer.c -o
> tree-vectorizer.o
> cc1: warnings being treated as errors
> /home/eric/gnat/gnat6/src/gcc/tree-vectorizer.c: In function
> 'vect_can_force_dr_alignment_p':
> /home/eric/gnat/gnat6/src/gcc/tree-vectorizer.c:1532: warning: comparison
is
> always true due to limited range of data type
> make[3]: *** [tree-vectorizer.o] Error 1
>
> bool
> vect_can_force_dr_alignment_p (tree decl, unsigned int alignment)
> {
>   if (TREE_CODE (decl) != VAR_DECL)
>     return false;
>
>   if (DECL_EXTERNAL (decl))
>     return false;
>
>   if (TREE_ASM_WRITTEN (decl))
>     return false;
>
>   if (TREE_STATIC (decl))
>     return (alignment <= MAX_OFILE_ALIGNMENT);
>
>

Probably alignment should be of type unsigned HOST_WIDE_INT to avoid that
kind of warnings?

Victor and Ira


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