This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, wide-int] change fixed_wide_int_storage from class to struct
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Gerald Pfeifer <gerald at pfeifer dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Mike Stump <mikestump at comcast dot net>, Richard Sandiford <rdsandiford at googlemail dot com>, Kenneth Zadeck <zadeck at naturalbridge dot com>
- Date: Sun, 15 May 2016 13:30:40 -0700
- Subject: Re: [PATCH, wide-int] change fixed_wide_int_storage from class to struct
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 20 dot 1605152057040 dot 2881 at anthias dot pfeifer dot com>
On Sun, May 15, 2016 at 12:03 PM, Gerald Pfeifer <gerald@pfeifer.com> wrote:
> While not a bug according to the language of the C++ standard, this
> causes dozens of warnings when building GCC with clang, and there is
> not benefit of mixing struct and class like this.
>
> Mike, when I had a similar case a while ago you sounded pretty
> supportive of this kind of change. Would you be fine to pre-approve
> such changes?
Can we recommend that clang disable this warning by default instead?
Or use an option flag to disable the warning while compiling gcc?
Thanks,
Andrew
>
> Gerald
>
> 2016-05-15 Gerald Pfeifer <gerald@pfeifer.com>
>
> * wide-int.h: Change fixed_wide_int_storage from class to struct.
>
> Index: wide-int.h
> ===================================================================
> --- wide-int.h (revision 236255)
> +++ wide-int.h (working copy)
> @@ -294,7 +294,7 @@
> HOST_WIDE_INT *VAL = RESULT.write_val ()
>
> template <typename T> class generic_wide_int;
> -template <int N> struct fixed_wide_int_storage;
> +template <int N> class fixed_wide_int_storage;
> class wide_int_storage;
>
> /* An N-bit integer. Until we can use typedef templates, use this instead. */