Issue 53: C keywords (c_mapping-rtf) Source: (, ) Nature: Bug Severity: Serious Summary: Summary: There seems to be no provision for the possibility of C keywords appearing in IDL. Resolution: resolved and closed Revised Text: add new parag To avoid C compilation problems, every use in OMG IDL of a C keyword as an identifier is mapped into the same name preceded by the prefix "_cxx_". For example, an IDL interface named "case" would be named "_cxx_case" when it is mapped into C. For consistency, this rule also applies to identifiers that are derived from IDL identifiers. For example, an IDL interface "case" generates the names "_cxx_case_var" and "_cxx_case_ptr", that is, the IDL compiler behaves as if the interfaces were named "cxx_case" and then applies the normal mapping rules. add table of c keywords auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void default goto sizeof volatile do if static while Actions taken: July 11, 1996: Received issue December 12, 1996: issue moved from cxx_revision to c-rev-wg October 5, 2000: closed issue Discussion: End of Annotations:===== Date: Mon, 13 Mar 2000 18:11:24 -0500 From: "Barker, Thomas" Subject: Issues to be discused and voted by 3/24/2000(COB) To: "'C-RFT'" Message-id: <99AA2270B1E6D111BCE10000F805F17F043EB1FD@emss35m02.owg.fs.lmco.com> MIME-version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-transfer-encoding: 7BIT Content-Type: text/plain; charset=iso-8859-1 X-UIDL: K,Ie9SN0!!?]7!!*@,!! I want to start making some progress on the C RTF (I aplologize for not getting to it earlier, but it been a bad fall and winter). I think that many of the issues can be dealt with quickly so I propose to try to kill about 10 per week for the next couple of months. This batch seemed typical. I just took the first 10 from the list at http://www.omg.org/issues/c_mapping-rtf.html. I'd think the requirement for a vote by 3/24 seems reasonable, but if I discusion between now and 3/17 indicates that any particular issue(s) are not agreeable to everyone I will pull that issue(s) from the list to be voted in this batch. I have gone through the issues, copied the name and summary sentence into this note, then proposed a resolution for each. Tom Issue 53: C keywords Summary: There seems to be no provision for the possibility of C keywords appearing in IDL. Discussion - I think this refers to fact that the C++ Language binding has a paragraph addressing this topic and C does not. I propose we include the C++ paragraph in the C Language Binding almost verbatim and add it to section 1.2. We will have to generate the required table as a section 1.2.1. The new paragraph will be: "To avoid C compilation problems, every use in OMG IDL of a C keyword as an identifier is mapped into the same name preceeded by the prefix "_cxx_". For example, an IDL interface named "case" would be named "_cxx_case" when it is mapped into C. For consistency, this rule also applies to identifiers that are derived from IDL identifiers. For example, an IDL interface "case" generates the names "_cxx_case_var" and "_cxx_case_ptr", that is, the IDL compiler behaves as if the interfaces were named "cxx_try" and then applies the normal mapping rules. The complete list of C keywords can be found in Section 1.xx on page 1-xxx. " The only objection to this might be the use of _cxx_ as the prefix. I argue that the common name would allow more interactions between C and C++ modules, particularly for those of us that use a common ORB for both languages. However, I could easily be talked out of that position.