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: [C++ Patch] Produce canonical names for debug info without changing normal pretty-printing (issue6215052)


On Wed, May 30, 2012 at 4:40 PM, Sterling Augustine
<saugustine@google.com> wrote:
> On Wed, May 30, 2012 at 2:15 PM, Gabriel Dos Reis
> <gdr@integrable-solutions.net> wrote:
>> On Tue, May 29, 2012 at 5:32 PM, Sterling Augustine
>> <saugustine@google.com> wrote:
>>
>>>> Index: gcc/c-family/c-pretty-print.h
>>>> ===================================================================
>>>> --- gcc/c-family/c-pretty-print.h ? ? ? (revision 187603)
>>>> +++ gcc/c-family/c-pretty-print.h ? ? ? (working copy)
>>>> @@ -30,7 +30,8 @@ along with GCC; see the file COPYING3. ?If not see
>>>> ?typedef enum
>>>> ? {
>>>> ? ? ?pp_c_flag_abstract = 1 << 1,
>>>> - ? ? pp_c_flag_last_bit = 2
>>>> + ? ? pp_c_flag_last_bit = 2,
>>>> + ? ? pp_c_flag_gnu_v3 = 4
>>
>> "last bit" should really be last bit. ?That means the value for
>> pp_c_flags_last_bits
>> should be 1 << 2 with the new addition.
>
> Good catch. There is a single use of pp_c_flag_last_bit in
> cxx-pretty-printer.h to define the first C++ flag like so:
>
> ?pp_cxx_flag_default_argument = 1 << pp_c_flag_last_bit
>
>
> So shouldn't the enum look like this?
>
> typedef enum
> ?{
> ? ? pp_c_flag_abstract = 1 << 1,
> ? ? pp_c_flag_gnu_v3 = 1 << 2,
> ? ? pp_c_flag_last_bit = 3
> ?} pp_c_pretty_print_flags;
>
> Thanks,
>
> Sterling

Yes, you are absolutely right.

-- Gaby


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