public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Janne Blomqvist <blomqvist.janne@gmail.com>
To: Ian Lance Taylor <iant@google.com>
Cc: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org,   fortran@gcc.gnu.org
Subject: Re: PATCH RFA: -Wc++-compat warnings for assignments to enum variables
Date: Thu, 23 Apr 2009 20:03:00 -0000	[thread overview]
Message-ID: <49F0C982.8090407@gmail.com> (raw)
In-Reply-To: <m3ab6875tm.fsf@google.com>

Ian Lance Taylor wrote:
> This patch, the next step in my -Wc++-compat work, turns on warnings for
> assignments to variables of enum type.
> 
> There are two patches here.  The first, smaller, patch enables the
> warning.  The main work here is to add a parameter to build_modify_expr,
> so that we can emit warnings for assignments to bitfields in structs
> with enum type.  The additional parameter is required because at the
> point of convert_for_assignment, the original enum type has been
> replaced by a bitfield integer type.  This patch requires approval from
> the C and C++ frontend maintainers.  Please also take a quick look at
> the new test case, and let me know if there are any other cases I should
> check.
> 
> The second patch fixes all the cases I discovered where this warning is
> triggered when bootstrapping gcc.  As before I tested building the arm,
> pa, ia64, mips, ppc, s390, sparc, and spu backends.  I verified that
> they continued to work the same way on a range of preprocessed test
> cases.  This second patch requires approach from the C++, Java, and
> Fortran maintainers.  It might be useful for the OpenMP maintainers to
> look at the changes to gimplify_omp_for, which were slightly less
> mechanical than the other changes.
> 
> Bootstrapped and tested on i686-pc-linux-gnu.  OK for mainline?
> 
> Ian

Fortran parts are Ok. Thanks for working on this (ze dream is aliiive!).

> fortran/ChangeLog:
> 
> 2009-04-22  Ian Lance Taylor  <iant@google.com>
> 
> 	* gfortran.h (enum gfc_symbol_type): New named enum type, broken
> 	out of struct gfc_symbol.
> 	(struct gfc_symbol): Use enum gfc_symbol_type.
> 	(enum gfc_array_ref_dimen_type): New named enum type, broken out
> 	of struct gfc_array_ref).
> 	(struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
> 	(mod_pointee_as): Update declaration.
> 	* decl.c (add_global_entry): Change type to enum gfc_symbol_type.
> 	(gfc_mod_pointee_as): Change return type to "match".
> 	* module.c (mio_array_ref): Add cast to enum type.
> 	(mio_symbol): Likewise.
> 	* resolve.c (resolve_global_procedure): Change type to enum
> 	gfc_symbol_type.
> 	* trans-io.c (gfc_build_st_parameter): Change type to unsigned
> 	int.


-- 
Janne Blomqvist

      parent reply	other threads:[~2009-04-23 20:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22 21:11 Ian Lance Taylor
2009-04-22 22:10 ` Joseph S. Myers
2009-04-22 22:54 ` Tom Tromey
2009-04-23 20:03 ` Janne Blomqvist [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49F0C982.8090407@gmail.com \
    --to=blomqvist.janne@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iant@google.com \
    --cc=java-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).