From mboxrd@z Thu Jan 1 00:00:00 1970 From: H.J. Lu To: egcs@cygnus.com Subject: Ugly *.def in gcc Date: Tue, 19 Aug 1997 19:24:42 -0000 Message-id: X-SW-Source: 1997-08/0189.html 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) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: egcs@cygnus.com Subject: Re: A prototype patch for tree.h/tree.def/calls.c Date: Tue, 19 Aug 1997 19:45:02 -0000 Message-ID: In-reply-to: A prototype patch for tree.h/tree.def/calls.c X-SW-Source: 1997-08/0190.html Message-ID: <19970819194502.3P1NM1QPhwk1V84NWDQfaByJMGQNMhpSCXHJLuP5l7U@z> In message you write: > > But regardless of what other parts of gcc are doing, using "unsigned" > > in the prototype for xmalloc is wrong and such a change will not be > > installed. > > It makes nosenses when the definion of xmalloc uses unsigned > and its prototype uses size_t. It is much worse. Providing a prototype that is blatently wrong will not be accepted. There's no use argueing about this, an incorrect patch will not be accepted. > What is the working alternative? Will it ever be > implemented. How much will it take to do it? You > don't have to love something to use it. The alternative is to get the other stuff installed first, then analyze the situation later as a group. Your patches for enum rtx code and enum tree_code will not be accepted without a review at a later date. I want this to be a separate issue from the main body of prototyping patches. Please table this issue until we get the main body of the prototype patches installed -- continueing to discuss it only distracts from other stuff that needs to be addressed at the current time. > egcs. Besides, there are many prototypes in gcc like it. > I just happen to like that style when I was working on it. Sorry to hear that. > I don't > feel like to spend my time on it. I don't see why my patch > should be rejected just because of it. And I don't have the time or desire to reformat your patches. If you feel prototyping is important and you want to get it in soon, then you'll have to do some formatting work. Jeff