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: Patch: FYI: avoid use of C++ keywords in gcc/java


On Wed, 2 Jul 2008, Tom Tromey wrote:

> >>>>> "Kaveh" == Kaveh R GHAZI <ghazi@caip.rutgers.edu> writes:
>
> Kaveh> I still get failures when applying it to mainline.  Was this
> Kaveh> supposed to be applied against the gcc-in-cxx branch only?  (I
> Kaveh> don't have it checked out to try it ATM.)
>
> Nope, definitely trunk.  Also this is the only patch in my tree.
> Do you have some other local patch?
> I'll send you an updated patch off-list.
> Tom

Okay, got the patch working on my end.  (The problem was that the
surrounding source code had embedden ctrl-L's in it and they didn't
survive a cut-n-paste on my end causing the patch conflicts.  My fault.)

There are about 1540 unique C++ keyword warnings during bootstrap, (urp).
It dies in libgomp like you described elsewhere.  I grep'ed out the C++
keyword warnings from my log and got a count for each source file.  I made
a small patch to clean up the gen*.c files, but nothing else ATM.  If you
plan to submit this for mainline, I'll help but I can't do the whole thing
myself again.

I think a strategy for getting some assistance would be to *temporarily*
put the warning under its own flag so you could activate it as a soft
warning via a #pragma diagnostic in system.h like I did for -Wc++-compat.
Then people would see them and could fix individual warnings.  Once it was
all cleaned up, you could merge it into -Wc++-compat and get rid of the
temporary flag.  If there's an easier way to leave the void*->T* as a hard
error while having the C++ keyword be a soft warning, by all means do that
instead of creating a temporary -W* flag. :-)

		Thanks,
		--Kaveh


grep warning: output | grep keyword | sed 's%.*/gcc/%%' | sort -u | \
sed 's%:[0-9]*: warning:%: warning:%; s%: warning:.*%%' | uniq -c

yields:

     18 bt-load.c
      5 builtins.c
      2 c-pch.c
     34 caller-save.c
      4 calls.c
     25 cgraph.c
      5 combine-stack-adj.c
    101 combine.c
      5 cp/decl.c
      4 cp/friend.c
      5 cp/init.c
     13 cp/mangle.c
     28 cp/name-lookup.c
     21 cp/parser.c
     84 cp/pt.c
      4 cp/tree.c
      3 cp/typeck.c
      1 crtstuff.c
     61 cse.c
      9 df-problems.c
      6 df-scan.c
      8 dse.c
     70 emit-rtl.c
     18 except.c
      3 explow.c
      9 expr.c
     21 final.c
     20 fortran/arith.c
     12 fortran/array.c
      7 fortran/bbt.c
     32 fortran/decl.c
     11 fortran/dependency.c
      3 fortran/dump-parse-tree.c
     14 fortran/expr.c
      4 fortran/gfortran.h
    113 fortran/interface.c
     39 fortran/intrinsic.c
     14 fortran/io.c
      2 fortran/iresolve.c
      6 fortran/match.c
     11 fortran/matchexp.c
     43 fortran/module.c
      4 fortran/openmp.c
     13 fortran/resolve.c
      3 fortran/scanner.c
      5 fortran/st.c
      7 fortran/symbol.c
      3 fortran/trans-common.c
      3 fortran/trans-decl.c
     18 fortran/trans-expr.c
      1 fortran/trans-openmp.c
      4 fortran/trans-types.c
      1 fortran/trans.h
     54 function.c
     40 fwprop.c
     26 gcse.c
      6 genattrtab.c
      5 genemit.c
      4 gengtype.c
      1 gengtype.h
     20 genoutput.c
     26 genrecog.c
      5 gensupport.c
     17 gimplify.c
      1 intl.c
      3 ipa-cp.c
     10 lcm.c
      1 libgcc2.c
      3 lower-subreg.c
      3 matrix-reorg.c
      4 mode-switching.c
      7 passes.c
      2 profile.c
      4 ra.h
     20 recog.c
     37 reg-stack.c
     69 regrename.c
     33 reload1.c
     14 rtlanal.c
      4 rtlhooks.c
      3 sched-rgn.c
      9 tree-dump.c
     13 tree-eh.c
     88 tree-inline.c
     14 tree-into-ssa.c
      9 tree-predcom.c
      6 tree-vrp.c
      9 tree.c
      6 value-prof.c
      4 varasm.c


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