This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][buildrobot] libcpp/lex.c: Use enum properly
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Jan-Benedict Glaw <jbglaw at lug-owl dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Per Bothner <per at bothner dot com>, Tom Tromey <tromey at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 24 Oct 2013 18:25:49 -0700
- Subject: Re: [PATCH][buildrobot] libcpp/lex.c: Use enum properly
- Authentication-results: sourceware.org; auth=none
- References: <20131024090529 dot GV19160 at lug-owl dot de> <410BFD96-010C-4E5B-9F0A-891E8FDB654D at comcast dot net>
On Thu, Oct 24, 2013 at 6:22 PM, Mike Stump <mikestump@comcast.net> wrote:
> On Oct 24, 2013, at 2:05 AM, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
>> - enum raw_str_phase { RAW_STR_PREFIX, RAW_STR, RAW_STR_SUFFIX };
>> - raw_str_phase phase = RAW_STR_PREFIX;
>> + enum raw_str_phase { RAW_STR_PREFIX, RAW_STR, RAW_STR_SUFFIX } phase = RAW_STR_PREFIX;
>
> Since no one else chimed inâ seems obvious to meâ though the line is too long. Better likely would be to just say:
No it does not due to in C++ the name is injected without the enum tag too.
>
> enum raw_str_phase phase = RAW_STR_PREFIX;
This is a good work around but please add a comment of why this is
needed (to work around a bug in XLC++).
Thanks,
Andrew