This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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 1/3] Fix mismatched struct vs class tags.


On Wednesday, November 23, 2016 03:58:11 PM Simon Marchi wrote:
> On 2016-11-23 15:06, John Baldwin wrote:
> > The 'collection_list' and 'number_or_range_parser' types were converted
> > from structs to classes, but some code still used 'struct'.  Fix all
> > references to use 'class' which fixes -Wmismatched-tags warnings issued
> > by clang.
> 
> Whjen using the type in a parameter or variable declaration, should we 
> simply drop the keyword?
> 
> For example:
> 
> -  struct collection_list *collect;
> +  collection_list *collect;
> 
> That's the approach I took in my upcoming C++ patches, so I hope it's ok 
> :).  I have also dropped the "enum" keyword when possible.

Hmm.  I don't see anything about this in the GCC C++ language conventions,
so I will have to defer to others as far as what is the desired style here?
(And we should document whatever style is chosen)

-- 
John Baldwin


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