From mboxrd@z Thu Jan 1 00:00:00 1970 From: H.J. Lu To: egcs@cygnus.com Subject: Re: A prototype patch for tree.h/tree.def/calls.c Date: Tue, 19 Aug 1997 17:54:31 -0000 Message-id: In-reply-to: 3130.872004634@hurl.cygnus.com X-SW-Source: 1997-08/0163.html > > In message you write: > > I have some problem s with my emails for the past few days. I may > > have lost some. I only remember your comments on BUFSIZ being a macro, > > which turned out ok. What else? > Relatively minor stuff. > > For this pass #if 0 the prototypes for xmalloc and related funtions; > once the bulk of the prototypes are in, please submit a separate > patch to enable prototyping of xmalloc and related functions. On my machine, they are enabled. > > This should help deal with the varying prototypes and lack of > proper casts throughout the gcc sources. > > Also, the prototypes are wrong, you changed an argument from a > "size_t" to "unsigned". On some systems, they're different > sizes! > That is exactly the problem with size_t. How can you be sure size_t is available on all systems when xmalloc () is used? many xmalloc () in gcc use unsigned. I think it makes some senses. > > > Other prototypes in rtl.h (and other locations) try to get the PROTOs > to line up in a nice column. Can you line them up? It will certainly > make them easier to read later. Seems like a nit, but it really > makes stuff easier to read. > I have spent weeks on it. I am afraid I may make some stupid mistakes if I try to reformat it. After all, those prototypes are mainly for compiler. Please feel free to reformat it. Thanks. > > > The reason of > > odd rtl.def patch is the prototyping config.h may require > > enum etx_code before rtl.h is included. > I don't understand this. > > If config.h requires enum rtx_code before rtl.h is included, how > does this change help? > > I would punt this issue for this round too. We can return to it after > we've got the bulk of the other prototype stuff installed. Here is what I have in my i386.h: #define NEED_enum_rtx_code #include "rtl.def" #undef NEED_enum_rtx_code #define NEED_enum_machine_mode #include "machmode.def" #undef NEED_enum_machine_mode ..... extern int ix86_expand_binary_operator PROTO ((enum rtx_code, enum machine_mode, struct rtx_def *[])); ..... As I said, gcc was not designed with prototyping in mind. H.J.