[Info-vax] C and C++ and clanger-free clanging (was: Re: Porting to Linux instead of x86-64 VMS, ...)

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Wed Jul 3 13:54:41 EDT 2019


On 2019-07-03 16:15:42 +0000, John Reagan said:

> Beyond that, I can't do a DCL "syntax" change on /STANDARD=C11.  I 
> could try something like "CC/CLANG" or "CC/C11" that would turn around 
> an attempt to invoke clang with the "you are a C compiler and accept 
> C11 code" but I find that ugly.  My current plan is say "invoke 
> SYS$SYSTEM:CLANG.EXE" (or whatever we decide on the final name) as a 
> DCL foreign command.

Okay, the phrasing here is somewhat ambiguous.  Are you referring to 
making a syntax switch from DCL to a foreign-command, or are you 
discussing the default compilation mode for C code invoking the C 
compile absent a specific /STANDARD selection?

Absent a specific selection, the default standard was the newest, IIRC. 
 That hasn't been tripping folks since shortly after 1999 and for what 
should be obvious reasons, but there was an assumption that developers 
would have to add switches to accept old and now-deprecated standards.  
And I see no reason not to make C11 the default, if there's no C18 and 
thus C11's the newest available.

That it's two separate compilers with two separate licenses has been 
tripping new-to-OpenVMS developers for some time.

If it's around the compiler switches and changing from DCL parsing 
syntax to clang's own switch syntax?    For those that don't want to do 
that and just want to add a few, /CLANG="-Wall-Wextra -pedantic", 
maybe.  But then I'll probably be dropping down to the clang command 
line directly.  Which is where I think you're headed, if this is about 
DCL command parsing and not about C standards and source code parsing...

> My experience is that most people care about newer C++ standards, not 
> about C11 or C18.  The only C11 feature I've been asked about is 
> "static_assert".  I'd be willing to cherry-pick that one and put that 
> into our C frontend.  Most of C11 is atomic and threading which can be 
> done with C++.
> 
> For a good description, read:
> 
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3631.pdf

Yeah, the Dr Dobb's article is a pretty good one.

Also see: 
https://smartbear.com/blog/test-and-monitor/c11-a-new-c-standard-aiming-at-safer-programming/ 


There's stuff there that I've been using else-platform.  Or 
occasionally back-porting to OpenVMS.  Better support for turd files, 
too.

Re-reading the C manuals every few years was handy, given what was 
being added in the latter parts of V7 and into the early V8 range.

Getting threading integrated with KP threads and maybe also with 
gcd/libdispatch and with the blocks/closures support would be nice.  
Better threading than what is available.


-- 
Pure Personal Opinion | HoffmanLabs LLC 




More information about the Info-vax mailing list