OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-c-cpp message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [sca-c-cpp] Restriction regarding macros



I think this came from us not wanting to write a complete c++ parser/compiler to generate any proxies etc. so it was more the defining of functions that was the issue.

Pete Robbins

Phone: UK (01962) 818667
Notes: Pete Robbins/UK/IBM@IBMGB
email: robbins@uk.ibm.com



Bryan Aupperle <aupperle@us.ibm.com>

17/06/2009 13:35

To
sca-c-cpp@lists.oasis-open.org
cc
Subject
[sca-c-cpp] Restriction regarding macros






Section 9 of the C++ spec (and the C spec as well for that matter) states that a header file used to define an interface must not use macros.  This restriction dates back to the OSOA days so I am trying to get a bit of history on it.  Is the intent to prohibit any use of #define in a header file (that is the implication of the current wording) or something less restrictive?  Some specific considerations:


Header guards (should be allowed)

Manifest constants (probably safe, but use limited to multidimensional arrays - anything else?)

Linkage switches - extern or not, etc. (again probably safe and do not impact mapping to/from WSDL)

Macro functions (these need to be kept out of interfaces)


What do folks think?


Thanks


Bryan Aupperle, Ph.D.
STSM, WebSphere Enterprise Platform Software Solution Architect

Research Triangle Park,  NC
+1 919-254-7508 (T/L 444-7508)
Internet Address: aupperle@us.ibm.com



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]