This is the mail archive of the
mailing list for the GCC project.
Re: GCC_DRIVER_HOST_INITIALIZATION in gcc.c
> standard_startfile_prefix is initialized to a string in gcc.c, and never
Ok, you start off with an invalid assumption. It *is* modified.
> standard_startfile_prefix_0 would not be initialized to a string, and
> would have a comment indicating that it exists for communication with
> the GCC_DRIVER_HOST_INITIALIZATION/UPDATE_PATH_HOST_CANONICALIZE macros
> that some ports define. This would make the relationship explicit, and
> easier to maintain.
So you want to change this:
/* This may be changed by the target */
char * startfile_prefix = "something";
/* This is never changed */
const char * const startfile_prefix = "something";
/* This may be changed by the target, and overrides the above */
char * startfile_prefix_0 = 0;
I object to this. It makes the code more confusing to read, more
difficult to maintain, and slower to execute. If the logic is not
done just right, it may even use files that it should not use, leading
to subtle (and thus hard to track down) bugs.
IMHO it would be better to just document the old use.