[Info-vax] C99 updates to CRTL

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Sat Jul 27 16:45:09 EDT 2019


On 2019-07-27, Arne Vajhøj <arne at vajhoej.dk> wrote:
> On 7/27/2019 1:12 PM, John Reagan wrote:
>> On Saturday, July 27, 2019 at 9:53:07 AM UTC-4, Craig A. Berry wrote:
>>>
>>> The _ANSI_C_SOURCE requirement is what hides this function and setting
>>> that macro explicitly does get the example to compile without warnings:
>>>
>>> $ cc/define="_ANSI_C_SOURCE" test_isblank
>>>
>>> However, defining that breaks a ton of things.  It disables all DEC C
>>> extensions, such as the optional RMS arguments to the standard I/O
>>> functions, and hides lots of functions that are de facto standards but
>>> not specified by ANSI, such as setjmp and strnlen (to name only two I
>>> stumbled across in a quick look around the headers).  pthread.h says,
>>> "_ANSI_C_SOURCE (ANSI C) will disable thread support."  Ouch.
>
>> My apologies.  We did do testing but obviously not enough.  I'll pass it along.
>> 
>> The extra difficult is what some things that used to be DEC
>> extensions to C89 became standard with C99.  All those symbols are a
>> PITA.  We need to work harder on them.
>
> I am not an expert in C headers or the finer points in the various
> C standards.
>
> But I have this feeling that there are or will be a need
> to be able to chose between modern and compatibility.
>
> Aka:
>
> $ CC/MODERN ...
>
> or:
>
> $ DEFINE DECC$STYLE "MODERN"

Arne, are you _trying_ to trigger Stephen ? :-)

It's bad enough using logicals to alter behaviour at runtime, but
at compile time as well ? :-)

On a more serious note, I wonder if it would help if the VMS extensions
were considered to exist outside of the language version you are compiling
against, so they were always available unless turned off using another
qualifier during compilation ?

John has mentioned that some C89 extensions became C99 standards
but if the feature is available as standard in C99 then disabling
the VMS extensions when compiling in C99 mode would still leave
those features enabled as they were no longer VMS specific extensions.

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world



More information about the Info-vax mailing list