TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mike Bilow
from: Paul Edwards
date: 1995-12-03 14:10:36
subject: C Set ++

PE> when compiling in "ISO-compliant" mode, then it must either
PE> start with a single _ and a capital letter, or two _ and a
PE> lowercase letter, e.g. __cstart is OK and _Cstart is ok.  In
PE> fact, Watcom C++ 10.0b calls theirs _cstart from memory,
PE> which interferes with the namespace, thus making their
PE> compiler non-conforming.

MB> Watcom is very careful about this, and uses macros to map the single 
MB> underscore versions of labels to the double underscore versions.  If the 
MB> compiler is being operated with the necessary switches for strictly 
MB> compliant mode, then these macros are not applied.

PE> I would like to withdraw the above comment with regards to Watcom,
PE> as although I got the name right (I can see that in my code), I
PE> cannot remember the exact circumstances, and I failed to document
PE> it at the time, and I am unable to reproduce it now, despite
PE> trying every combination I could think of, so I have no evidence
PE> of anything non-conforming about Watcom.

I would like to reinstate the comment up top, here is the evidence...

/* This program demonstrates Watcom C++ 10.0b not conforming to
   ISO/IEC 9899:1990.
   
   There is nothing wrong with me creating a function called
   _cstart(), yet this program gives a whole swag of linker
   errors when compiled under OS/2 */
   
#include 

void _cstart(void)
{
    printf("hello\n");
    return;
}

int main(void)
{
    _cstart();
    return (0);
}
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.