public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Ugly *.def in gcc
@ 1997-08-19 19:24 H.J. Lu
  1997-08-19 19:45 ` A prototype patch for tree.h/tree.def/calls.c Jeffrey A Law
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 1997-08-19 19:24 UTC (permalink / raw)
  To: egcs

Hi,

Many people object my proposed patch to *.def in gcc. I can
understand it. I hated it when I started working on gcc
prototyping and I still don't like it now.

But after spending days on it, I realized that there was no
better alternative other than expending the current ugly
scheme unless you want to do some massive restructure. Right
now, gcc has

--rtl.h---
#define RTX_CODE        enum rtx_code
enum rtx_code  {
 
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)   ENUM ,
#include "rtl.def"
#undef DEF_RTL_EXPR
  LAST_AND_UNUSED_RTX_CODE}; 

I modified it to

--rtl.h--
#define NEED_enum_rtx_code
#include "rtl.def"
#undef NEED_enum_rtx_code

My change certainly doesn't fix the ugliness. But it makes
prototype work.


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-08-19 19:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-19 19:24 Ugly *.def in gcc H.J. Lu
1997-08-19 19:45 ` A prototype patch for tree.h/tree.def/calls.c Jeffrey A Law

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).