This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libcpp PATCH] Resolve DR#412 - unevaluated #elif (PR preprocessor/60570)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 22 Jan 2015 23:20:39 +0000
- Subject: Re: [libcpp PATCH] Resolve DR#412 - unevaluated #elif (PR preprocessor/60570)
- Authentication-results: sourceware.org; auth=none
- References: <20150122144237 dot GD1632 at redhat dot com>
On Thu, 22 Jan 2015, Marek Polacek wrote:
> As discussed in the PR, this patch partially reverts Tom's change
> in r136209. (The is_if argument to _cpp_parse_expr is kept for the
> sake of diagnostics.)
>
> The change made sense at that time, but now we have DR#412 resolved.
> This DR deals with the case where we have an #elif conditional that
> doesn't have to be evaluated:
>
> #if 1
> int i;
> #elif 1/0
> #endif
>
> and this DR says that such #elifs should be skipped.
> This change is deliberately not conditioned on any standard version.
>
> Jason, Joseph, does it make sense to put this into GCC 5, or should it wait
> for GCC 6? Since this change makes the preprocessor more permissive, it
> should hurt nobody.
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
OK for GCC 5.
--
Joseph S. Myers
joseph@codesourcery.com