bug-autoconf
[Top][All Lists]
Advanced

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

Re: AC_C_RESTRICT


From: Ralf Wildenhues
Subject: Re: AC_C_RESTRICT
Date: Tue, 17 Mar 2009 20:33:31 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Eric Blake wrote on Tue, Mar 17, 2009 at 03:34:35PM CET:
> 
> Ralf brought up an interesting point - how often do people mix C and C++
> compilers of different origins, and expect things to work?  In other
> words, it seems to me that the most common use case is that you either
> stick with the vendor compiler in all cases (hence the workaround for the
> Sun compiler),

If that were the only use case, then the Sun issue (the one reported a
couple of weeks ago, not the one for older Sun suite versions) could
have been fixed in a simpler way: by trying _Restrict first.

> or you use gcc in all cases.  But if we're mistaken, and
> people really DO want to mix vendor C and g++ (or vendor C++ and gcc),
> then we must either entirely avoid restrict in C++, or else we must indeed
> make AC_C_RESTRICT perform additional testing inside an
> AC_LANG_PUSH([C++])/AC_LANG_POP block, if the configure script does
> anything for C++.

FWIW, this issue comes up more generally at times.  For example, several
bits in Libtool implicitly assume the compilers are from the same suite,
or at least roughly similar in that they use the same linker under the
hood.  Lifting all such restrictions while still allowing to create
mixed language code is pretty difficult in general (but would be nice to
have!).

Cheers,
Ralf




reply via email to

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