[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 25 06:10:29 PDT 2025
================
@@ -4456,6 +4456,12 @@ void Parser::ParseDeclarationSpecifiers(
isInvalid = DS.setFunctionSpecNoreturn(Loc, PrevSpec, DiagID);
break;
+ case tok::kw__Export:
+ // If we find kw__Export, it is being applied to a var or function
+ // This will be handled in ParseDeclaratorInternal()
----------------
AaronBallman wrote:
> in int _Export x,y; only x is exported.
That is deeply strange behavior IMO. I can't think of anything else in the language that works like that in that syntactic position.
> We do have to match the existing XL compiler for backwards compatibility.
That can be handled in the downstream too. For example, in this case, I would expect a diagnostic to let the user know that `_Export` very likely does not behave the way they expect in your code example.
https://github.com/llvm/llvm-project/pull/111035
More information about the cfe-commits
mailing list