[Info-vax] C compiler snag

John E. Malmberg wb8tyw at qsl.net_work
Fri May 21 20:19:07 EDT 2021


On 5/21/2021 12:46 PM, Simon Clubley wrote:
> On 2021-05-21, Simon Clubley <clubley at remove_me.eisner.decus.org-Earth.UFP> wrote:
>> On 2021-05-21, John Reagan <xyzzy1959 at gmail.com> wrote:
>>> I'll do more research but there is nothing of your description that matches what
>>> I know.  There is some GEM code mixed in as well.  I don't see the C compiler (or
>>> the C++) compiler doing anything to avoid DECC$ logicals.  For example, turn on
>>> DECC$POSIX_COMPLIANT_PATHNAMES and watch the compiler not able to find
>>> .TLB files, etc.
>>
>> John is very right about this. There is a problem when you use net/
>> within an include statement. The following code compiles: !!!
> 
> That is John Malmberg is right about this. Too many people called John
> around here. :-)

Wrong reproducer.  The bug demonstrated in the GNV gnulib_assist self test.

The bug only trips for me with decnet phase IV running which creates a 
NET0: device.

type [.vms]test_vms_if_h.c
#ifdef VMS_CRTL
#include <net/if.h>
#else
#include "vms/if.h"
#endif
#pragma assert_m non_zero(__IF_LOADED) "if.h did not get loaded."

Note, I have not tested the fragments posted here.

$ cdef = VMS_CRTL=1"
$ define/user decc$user_include "sys$disk:[.vms]"
$ CC/define=('cdef')'psize''cfloat''cinc'/noobj -
   [.vms]test_vms_stdio_h.c


The <net/if.h> is a standard header file used in network programming in C.

You simply can not compile that source if DECNET phase IV is running.
Not sure about Phase V, yanked that out a while back.

I will be posting an update to the gnulib_assist sometime this weekend 
after which all the things I have tests for will pass.

Current checked in code has a bug where it is skipping some tests and 
the rename wrappers to generate correct rename behavior is not implemented.

Regards,
-John




More information about the Info-vax mailing list