This is the mail archive of the gcc@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: TREE_COMPLEXITY


On Fri, 16 Jul 2004, Richard Kenner wrote:

>     There's no need to wait for Ada to be last.  
> 
> There is actually.  It's in a part of the compiler that can't be tested
> until more is working and I'd rather not do it "blind" unless I have to.
> That's why I sent the email instead of just doing it.

I now have a candidate triple of patches to test that get rid of
TREE_COMPLEXITY everywhere apart from Ada.  Patch 1 is Steven Bosscher's
patch <http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00863.html> for uses
in C++, updated to apply to current mainline (updated version attached).
It turns out that this is *completely* separate from the uses of
C_EXP_ORIGINAL_CODE in C (see the previous discussions of that patch) as
-Wparentheses for C++ was entirely broken by the new C++ parser:  
C_EXP_ORIGINAL_CODE never gets set to MODIFY_EXPR so the warnings for
assignments used as truthvalues never appear.  Patch 2 removes
TREE_COMPLEXITY from the C front end, and to avoid bogus warnings for C++
code with assignments other than plain = it also changes the C++ front end
to use TREE_NO_WARNING, the approach started by patch 1, for such
assignments that shouldn't get warnings (bringing the functionality of the
warnings for C++ back to its prior state, though certainly not to
perfection).  Patch 3 removes the complexity field from struct tree_exp
and removes TREE_COMPLEXITY from tree.c and tree.h.  I propose to test and
submit these together, though it may make sense for someone to approve
Steven Bosscher's patch separately so it can be applied first, being
logically separate from the rest.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)

Attachment: bosscher-updated-patch
Description: Text document


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