[Info-vax] C and C++ and clanger-free clanging

Arne Vajhøj arne at vajhoej.dk
Thu Jul 4 11:04:36 EDT 2019


On 7/4/2019 10:50 AM, Dave Froble wrote:
> On 7/4/2019 7:34 AM, Neil Rieck wrote:
>> On Wednesday, July 3, 2019 at 9:22:58 PM UTC-4, Dave Froble wrote:
>>> On 7/3/2019 4:29 PM, John Reagan wrote:
>>>> I was talking about the "syntax" clause in the .CLD file.  I'd like 
>>>> /STANDARD=C11 to invoke a different image.  I could make it really 
>>>> twisty and have the legacy VSI C compiler do a LIB$DO_COMMAND of 
>>>> clang-as-a-C11-compiler when /STAND=C11 is set.
>>>>
>>>> The problem with that is that clang-as-a-C-compiler will never 
>>>> support lots of pragmas that the legacy C compiler does.  It seems 
>>>> too confusing to magically switch the compiler out from under you 
>>>> with a /STANDARD qualifier option.  I want to make it clear that 
>>>> asking for C11 means a different compiler.  If you want to move into 
>>>> the future (er, past) with C11, it means you have to let go of the 
>>>> legacy tree.  Of course, open source software coming to OpenVMS for 
>>>> the first time won't use any of those old DEC features.
>>>>
>>>> For the CXX DCL interface to clang++, I don't see us providing an 
>>>> arbitrary /CLANG_OPTIONS="random string".  We'll provide a 
>>>> reasonable mapping for the existing DCL syntax for the 
>>>> "recompile-and-go" crowd.  We'll probably add some support for 
>>>> various common hardware flavors with /ARCH.  Maybe a few others.  
>>>> But if you want to specific lots of strange exotic options, use the 
>>>> foreign command form.  That said, if you compile without -fPIC (and 
>>>> perhaps a few other ones), the object probably won't link/execute 
>>>> correctly.  In order to support shareable images, INSTALL/RESIDENT, 
>>>> etc., you must compile with -fPIC.  The DCL interface will set that 
>>>> for you.  We'll provide guidance when the time comes.
>>>
>>> I'm not going to have all these problems with Basic, am I John?
>>
>> Hopefully not. As a matter of employment, I am required to use the 
>> VMS-BASIC compiler almost every day. People in our group have not used 
>> DCL command switches since we migrated from VAX to Alpha. In our case, 
>> everything is set "in the BASIC source code" using "option" statements.
> 
> Well, where else would one reasonably put such?  Different programs may 
> have different needs, and should those re-compiling the programs have to 
> remember how to do so?  Much better to just place the requirements 
> inside the programs.
> 
> Maybe some day C and such will learn how to do so?
> 
> Nah, I'm just dreaming ....
> 
> PS - and don't tell me it already can, I just don't care ...

C/C++ pragma exists for that purpose.

:-)

But anyway I don't think there is any need for Basic to have all those
options.

C programmers frequently needs to control very specifically what the
generated code does aka "assembler programming in C".

While I expect the typical Basic program to be business logic that
really doesn't care about most of this stuff.

Arne



More information about the Info-vax mailing list