>> + /* cp/parser.h gives gt-cp-parser.h for cp/parser.c ! */ >> + { DIR_PREFIX_REGEX "cp/parser\\.h$", >> + REG_EXTENDED, NULL_REGEX, >> + "gt-cp-parser.h", "cp/parser.c", NULL_FRULACT }, > > But cp/parser.c also gets its own gt-cp-parser.h. Won't they > conflict? Doesn't this mean that cp/parser.h should be renamed to > something else? (say cp/cp-parser.h).
My understanding is that, with that rule, GC generated code from cp-parser.h will end up into gt-cp-parser.h, together with the code generated from cp-parser.c. gengtype basically runs once for all files, so has no problem putting GC generated code from multiple input files into the same output file. In practical terms, cp/decl.c and cp/decl.h (or cp/name-lookup.c and cp/name-lookup.h) are in a similar situation, and work fine with similar gengtype.c rules. :-) Thanks