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] Type-safe wrapper for enum flags


On 11/01/2015 02:06 AM, Doug Evans wrote:
> On Thu, Oct 29, 2015 at 11:45 AM, Pedro Alves <palves@redhat.com> wrote:
>> This patch fixes C++ build errors like this:
>>
>> /home/pedro/gdb/mygit/cxx-convertion/src/gdb/linux-tdep.c:1126:35: error: invalid conversion from âintâ to âfilterflagsâ [-fpermissive]
>>        | COREFILTER_HUGETLB_PRIVATE);
>>                                    ^
>> ...
>> ---
>>  gdb/btrace.h                   |  10 +-
>>  gdb/c-exp.y                    |   5 +-
>>  gdb/common/enum_flags.h        | 211 +++++++++++++++++++++++++++++++++++++++++
>>  gdb/compile/compile-c-types.c  |   2 +-
>>  gdb/compile/compile-internal.h |   4 +
>>  gdb/completer.c                |   5 +-
>>  gdb/disasm.c                   |   4 +-
>>  gdb/infrun.c                   |  14 +--
>>  gdb/linux-tdep.c               |  19 ++--
>>  gdb/record-btrace.c            |  22 +++--
>>  gdb/record.h                   |   2 +
>>  gdb/source.c                   |   7 +-
>>  gdb/symtab.h                   |   6 +-
> 
> Nit.
> 
> Introducing a foo_bar file when every other file in the patch uses
> foo-bar is a bit odd.
> 
> enum-flags.h?
> 

Not sure about that.  The currently file name simply follows the class
name "class enum_flags".  AFAICS, we have other files with _ in the name
for that reason, like gdb_flags.h and gdb_signals.h.  Other examples are
gdb wrappers for some external header or functionality, like gdb_bfd.h,
gdb_expat.h, gdb_regex.h, etc.

Thanks,
Pedro Alves


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