autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Complex compiler/linker tests


From: Ralf Wildenhues
Subject: Re: Complex compiler/linker tests
Date: Fri, 1 Jul 2005 03:49:13 +0200
User-agent: Mutt/1.5.9i

Hi Liviu,

* Liviu Nicoara wrote on Thu, Jun 30, 2005 at 05:54:16PM CEST:
> 
> I am trying to understand what you mean by intuitive? How is it 
> intuitive for example a test case which tests for the existence of a 
> header file?

Well, intuitive might not have been a good word at all, sorry.

> The example is useful to me in that it allows me to detect a particular 
> behaviour of a C++ compiler/linker which allows me to craft my code 
> accordingly.

Surely.  But your example has a trivial different solution: don't write
code which depends on static inlines to be collapsed.  Sure, there might
be a slight performance hit (or maybe even a large one, I don't know).
(Or other important reasons, which I might not know of yet.)

> In what regards portability I would expect the [portable] 
> infrastructure I use to provide me the means to detect the unportable 
> language constructs or non-compliant compiler behaviour across the 
> platforms I am porting on.

Surely.  I would also fully encourage an in-Autoconf solution for the
problem type you described, if I saw a good example.

> The example I provided is representative for a real-world situation: 
> Microsoft Visual C++ 6.0/7.0/7.1 and Visual Age for C++ 5.x/6.x/7.0 both 
> violate ODR in certain situations. If you know a better or simpler way 
> to detect the behaviour in my example I would be happy to learn about 
> it, but just dismissing the example as not being representative for a 
> real-world situation is not very helpful.

I'm sorry if I appear non-helpful to you.  Maybe I can phrase it another
way:  there are certainly examples where it's much harder to work around
a missing feature or compiler limitation without a corresponding (multi
translation unit) configure test.  It could be helpful if you could
point out one.

Independently, if you decide to implement such a macro yourself, I'd
encourage you to post it here.

Regards,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]