This is the mail archive of the gcc-patches@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: RFC: New approach to --with-cpu


On Thu, Aug 01, 2002 at 02:03:26PM +0100, Richard Earnshaw wrote:
> > On Thu, Aug 01, 2002 at 11:56:17AM +0100, Richard Earnshaw wrote:
> > > > Daniel Jacobowitz <drow@mvista.com> writes:
> > > > > +#ifdef TARGET_DEFAULT_OPTION_CPU
> > > > > +  if (TARGET_DEFAULT_CPU_P ())
> > > > > +    add_option (argcp, argvp, "-mcpu=" XSTRING (TARGET_DEFAULT_OPTION_CPU));
> > > > > +#endif
> > > > 
> > > > Sorry, didn't notice first time.  Is it OK to use string
> > > > concatenation in gcc.c?
> > > 
> > > No, I don't think so. It isn't available (that way) in K+R C.
> > 
> > You're right, I should be using concat().  Before I fix that, does
> > anyone know whether XSTRING() works in K&R C, or whether I need to do
> > this with some extra quoting from configure?
> 
> I would have said that XSTRING was OK.  It would be a rather perverse K+R 
> compiler that didn't support either
> 
> #define STRINGX(s) "s"
> or 
> #define STRINGX(s) #s
> 
> to get stringification.

I know that STRINGX works; I'm just not sure how K&R compilers handle
the extra level of indirection in XSTRING.  Don't have one to test
with, and README.Portability is silent.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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