Re: Weak globals

Joe Pluta <joepluta-Kokj9vFzZubAKuVPhbf8BAC/[email protected]> Tue, 2 Apr 2019 10:21:52 -0500
Newsgroups gmane.comp.lang.as400.c
Message-ID <[email protected]>
And just to be a bit more precise, the __attribute__ ((weak)) syntax 
simply doesn't compile with the C compiler, even though it's 
specifically stated to do so in the manual.

     5       |void __attribute__ ((weak)) foo()
===========> ....................a.....b............................
*=SEVERE==========> a - CZM0275  Unexpected text '(' encountered.
*=SEVERE==========> b - CZM0276  Syntax error: possible missing '{'?

So I'm really getting tied up by the behavioral differences among the 
various compilation tools.  I'll do what I can to package it all up and 
send it to IBM.



On 4/2/2019 10:07 AM, Joe Pluta wrote:
> Yes, I do.  It's going to take a little while because I want the whole 
> package.  Another anomaly is that the syntax does NOT work with the C 
> compiler, including the alternate syntax described in the manual:
>
> https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/rzarg/function_attributes.htm 
>
>
> So I'll put together my test cases and reach out to the fine folks.
>

-- 
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/c400-l
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/c400-l.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com