Hi Johnny and list,
        Here is an update for the Weird Metal C problem....
        It turns out that the previous implementation using _asm violated the
C standard constraints. (The C Standard says names that only names that
start with an underscore and followed by either a capital letter or another
underscore can be reserved for use by an implementation) where the name
invaded the user namespace. They made the change at a release boundary, but
I guess the migration guide wasn't terribly clear about it.
        An easy workaround is to do a #define _asm __asm__ or at the compile
command add in the following flag: -D _asm=__asm

Thanks,

 Andrew Wilt
 z/SW Team Lead
 China Systems and Technology Lab (CSTL) Beijing

IBM Mainframe Discussion List <[email protected]> wrote on
10/29/2012 01:23:00 PM:

> From:
>
> Andrew N Wilt/Tucson/IBM@IBMUS
>
> To:
>
> [email protected]
>
> Date:
>
> 10/29/2012 01:23 PM
>
> Subject:
>
> Re: Weird Metal C problem
>
> Johnny,
>    I'm trying to find out if something has changed between z/OS 1.9 and
> z/OS 1.11. However, in the z/OS code I've been writing, the asm construct
> needs two underscores in front. (__asm) From your code below, it looks
like
> it is treating the _asm as a function call. Try adding an underscore to
the
> front of your _asm code.
>

> > Hi, List,
> >
> > After upgrading from z/OS 1.9 to z/OS 1.11,  all our metal c programs
> just
> > won't pass the compilation process.
> >
> > Take a simple test program for example:
> >
> >  #include <metal.h>
> >  #include <string.h>
> >   void main()
> > {
> >   _asm(" here we are " );
> > }
> >
> > It does pass the compilation, but the generated asm code is different
> from

> >
> > Then the compilation failed:
> >
> >     5     1 |  _asm(" here we are " : : : );
> > ===========> .......................a.................................
> > *=ERROR===========> a - CCN3276 Syntax error: possible missing ')'?
> >
> >
> > Actually all our programs which use ':' in _asm code encounter the same
> > 'missing ')' ' error.
> >
> > And those programs work well in the past.
> >
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to