This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/6] Andes nds32: machine description of nds32 porting (1).
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Chung-Ju Wu <jasonwucj at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 24 Jul 2013 16:08:43 +0000
- Subject: Re: [PATCH 2/6] Andes nds32: machine description of nds32 porting (1).
- References: <CADj25HMFJUOHWC5ZvDOrJH+xkCoN8sxHXhD2vb36bM95irWEdg at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1307092307170 dot 29921 at digraph dot polyomino dot org dot uk> <51EFF75C dot 2070705 at gmail dot com>
On Wed, 24 Jul 2013, Chung-Ju Wu wrote:
> We removed the fancy comment formatting as you suggested.
> However, for the comments like:
>
> /* ===================== */
> /* Title of section */
> /* ===================== */
>
> /* Title of subsection 1 */
>
> /* Title of subsection 2 */
>
> I wish I can keep such kinds of comment formatting so that
> it would be easier to distinguish the levels between sections
> and subsections against the chapter 17 in GCC Internals documentation.
>
> Is it ok to keep such formatting? :)
You can use form-feeds (control-L characters) to separate logical sections
in a source file.
> > > +/* Define intrinsic register names.
> > > + Please refer to nds32_intrinsic.h file, the index is corresponding to
> > > + 'enum nds32_intrinsic_registers' data type values.
> > > + NOTE that the base value starting from 1024. */
> > > +static const char* nds32_intrinsic_register_names[] =
> >
> > I suspect the array here can itself be made const.
> >
>
> I am declaring an array in which every element is "const char *" type.
> It is different to the declaration:
> "static char* const nds32_intrinsic_register_names[] ="
The question is whether it can be "static const char *const" - or do you
need to modify the array itself at runtime (which would be unfortunate in
terms of the aim to avoid global state)?
--
Joseph S. Myers
joseph@codesourcery.com