Hi Bin Bin,

On Thu, Mar 05, 2020 at 10:31:39AM +0800, binbin wrote:
> On 2020/3/5 上午2:35, Segher Boessenkool wrote:
> >On Wed, Mar 04, 2020 at 03:08:41PM +0800, binbin wrote:
> >>>>  * config/rs6000/rs6000.h (MAX_MACHINE_MODE): Include the header file
> >>>>  for MAX_MACHINE_MODE.
> >>>
> >>>The changelog entry should say *what* file is included, and under what
> >>>condition.  It doesn't have to say why (that belongs in the commit
> >>>message).
> >>>
> >>>But, can't you just include it unconditionally?  Don't we already,
> >>>anyway, via coretypes.h -> machmode.h -> insn-modes.h?
> >>
> >>OK, change it to uncondition.  Thanks for your suggestion.
> >
> >What about the second part?  Shouldn't it already be included anyway?
> 
> If "insn-modes.h" is not included in rs6000.h, it reports error showing
> MAX_MACHINE_MODE’ undeclared here (not in a function) in file included 
> from
> ../../host-powerpc64le-unknown-linux-gnu/gcc/tm.h:25
> from ../.././libgcc/libgcc2.c:29
> ../.././libgcc/../gcc/config/rs6000/rs6000.h:2495:42.  Thanks.

Sure.  But why do we need to include that file at all here?  It should
already be included via coretypes.h (which includes machmode.h, which
includes insn-modes.h).

> +extern GTY(()) tree builtin_mode_to_type[MAX_MACHINE_MODE][2];
> +extern GTY(()) tree altivec_builtin_mask_for_load;
>  
>  #ifndef USED_FOR_TARGET

Maybe it should be moved into here?  Or some other #ifdef trickery?


Segher

Reply via email to