PATCH: ObjC++-related common code mods

Zack Weinberg
Tue Aug 17 21:22:00 GMT 2004

Ziemowit Laski <> writes:

> On 17 Aug 2004, at 13.28, Zack Weinberg wrote:
>> Ziemowit Laski <> writes:
>> ...
>>> The get_file_basename() routine attempts to find which language
>>> subdirectory a given file lives in by comparing the identifiers
>>> immediately preceding the '/' directory separator with the directories
>>> it knows about.  This works now, with the directory list consisting of
>>> 'cp' and 'objc', but breaks when you add 'objcp' into the mix.  For
>>> example, upon being handed in 'gcc/objcp/objcp-decl.h', the routine
>>> erroneously concluded that the file resides in 'cp', by matching the
>>> 'cp/objcp-decl.h' suffix of the name.
>> Aha.  This is the explanation you were missing the first time; now I
>> understand this part of the patch.
>> You should be using IS_DIR_SEPARATOR here instead of comparing against
>> '/'.  Otherwise this part seems correct to me.
> Ok; how should I handle "objc/objc-act.h" further down in the patch?

I'm not sure I understand.  Having a slash in the pathname embedded in
gengtype.c should be fine - all supported operating systems understand
/ as a path separator; it's just that gengtype might get input with \
as the path separator, on Windows.


More information about the Gcc-patches mailing list