public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug optimization/14840] [tree-ssa] fold tree_code_type[CST] and tree_code_length[CST] in GCC itself
Date: Sun, 04 Apr 2004 16:11:00 -0000	[thread overview]
Message-ID: <20040404161129.15519.qmail@sources.redhat.com> (raw)
In-Reply-To: <20040403233411.14840.kazu@cs.umass.edu>


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-04 16:11 -------
Note the definifition for static_tree_code_type and TREE_CODE_CLASS is wrong for C++, Java, 
Objective-C and some all other languages besides C.
It should be more like which is right for every language but only folds to the constant for the language 
independent trees:
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,

static const char static_tree_code_type[] = {
#include "tree.def"
  'x'
};
#undef DEFTREECODE
 
#define TREE_CODE_CLASS(CODE)                 \
  (__builtin_constant_p (CODE)		      \
   && (CODE) <= LAST_AND_UNUSED_TREE_CODE     \
   ? static_tree_code_type[(int) (CODE)]      \
   : tree_code_type[(int) (CODE)])

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14840


  parent reply	other threads:[~2004-04-04 16:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-03 23:34 [Bug optimization/14840] New: " kazu at cs dot umass dot edu
2004-04-03 23:49 ` [Bug optimization/14840] " kazu at cs dot umass dot edu
2004-04-04  2:59 ` pinskia at gcc dot gnu dot org
2004-04-04  6:51 ` pinskia at gcc dot gnu dot org
2004-04-04  8:52 ` kazu at cs dot umass dot edu
2004-04-04 16:11 ` pinskia at gcc dot gnu dot org [this message]
2004-05-24 19:43 ` [Bug other/14840] " pinskia at gcc dot gnu dot org
2004-07-22  6:33 ` pinskia at gcc dot gnu dot org
2005-05-07  5:14 ` [Bug middle-end/14840] " kazu at cs dot umass dot edu
2005-05-08 17:00 ` pinskia at gcc dot gnu dot org
2005-05-08 21:30 ` kazu at cs dot umass dot edu

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=20040404161129.15519.qmail@sources.redhat.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).