This is the mail archive of the gcc@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: Name of files and functions etc.


>>>>> "David" == David Pettersson <david_pettersson@bredband.net> writes:

David> Currently I have placed the factor out functions in a files named
David> parse_factor.c (and .h). I feel this is a somewhat bad name,
David> is there any rule for file naming in use at gcc.

There is no rule I know of other than "whatever the maintainers will
accept".  Usually this means it has to be relatively clear and related
to the purpose of the file.

David> array_type:
David>         primitive_type dims
David>                 {
David>                   $$ = array_type_1(ctxp,($1));
David>                 }
David> |       name dims
David>                 {
David>                   $$ = array_type_2(ctxp,($1));
David>                 }
David> ;
David> Is this good (at least it is easy to find the place they are used even
David> if the names aren't any "implicit comments" on the code).

It would be preferable to have more meaningful names.  For instance in
this case they could be named after the part of the language the code
implements, like primitive and reference array types.

Tom


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