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: coretypes.h: change class rtx_def to struct


On Thu, 19 Jan 2017, Gerald Pfeifer wrote:

> This innocent looking patch shaves 1749 warnings in stage 1
> when building with clang (such as on newer versions of FreeBSD).
> 
> Richi, at one point you indicated such changes would be fine
> (though usually they go from struct to class)?

In this case I'd rather prefer you make rtx_def a class (for consistency
with the other classes deriving from it).

That change is ok.

Thanks,
Richard.

> Gerald
> 
> 2016-09-28  Gerald Pfeifer  <gerald@pfeifer.com>
> 
> 	* coretypes.h (class rtx_def): Change to struct.
> 
> Index: gcc/coretypes.h
> ===================================================================
> --- gcc/coretypes.h	(revision 240576)
> +++ gcc/coretypes.h	(working copy)
> @@ -59,7 +59,7 @@
>  /* Subclasses of rtx_def, using indentation to show the class
>     hierarchy, along with the relevant invariant.
>     Where possible, keep this list in the same order as in rtl.def.  */
> -class rtx_def;
> +struct rtx_def;
>    class rtx_expr_list;           /* GET_CODE (X) == EXPR_LIST */
>    class rtx_insn_list;           /* GET_CODE (X) == INSN_LIST */
>    class rtx_sequence;            /* GET_CODE (X) == SEQUENCE */
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)


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