Topic: Standard conformance


Author: James.Kanze@dresdner-bank.com
Date: 1999/08/25
Raw View
In article <MPG.122c8f46352509a2989f03@news.mindspring.com>,
  brahms@mindspring.com (Stan Brown) wrote:
> [about half a dozen newsgroups, including a nonexistent one, removed]

> francis@robinton.demon.co.uk (Francis Glassborow) wrote in
comp.std.c++:
> >But does their source code actually rely on wchar_t being an unsigned
> >short.  If so they are going to have a hell of a job providing and ISO
> >C++ mode.

> Is there any reason to think that Microsoft intend to do so?

> All indications are that standard conformance is a VERY low priority
> for the company.

Which probably says something about how important it is for the average
programmer, as well.  One thing is certain about Microsoft, that selling
their software is a very HIGH priority for the company.  If people
refused to use it because of conformance issues, you can bet that they
would be conformant, or at least make great strides toward conformance,
in their next release.

(Note that I am describing an "is" condition, not an as it should be.
IMHO, conformance should be a more important issue.  Fact is that an
enormous number of C++ programmers don't even know that there is a
standard.)

--
James Kanze                   mailto: James.Kanze@dresdner-bank.com
Conseils en informatique orient   e objet/
                  Beratung in objekt orientierter Datenverarbeitung
Ziegelh   ttenweg 17a, 60598 Frankfurt, Germany Tel. +49(069)63198627


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: Adam Spragg <adam_spragg@novaclarion.com>
Date: 1999/08/25
Raw View
James.Kanze@dresdner-bank.com wrote:
>
> (Note that I am describing an "is" condition, not an as it should be.
> IMHO, conformance should be a more important issue.  Fact is that an
> enormous number of C++ programmers don't even know that there is a
> standard.)

Don't know there is a standard in that they don't know the standard has
been accepted by ISO, or don't know there is a standard in that they
don't know that a standard was even being written?

If the latter - where did you get this info from? And what are 'enormous
numbers'? 70%?

Adam

--
Apparently [...] police in many lands are now complaining that local
arrestees are insisting on having their Miranda rights read to them,
just like perps in American TV cop shows. When it's explained to them
that they are in a different country, where those rights do not exist,
they become outraged. Starsky and Hutch reruns, dubbed into diverse
languages, may turn out, in the long run, to be a greater force for
human rights than the [United States] Declaration of Independence.
-- Neal Stephenson (Cryptonomicon -
http://www.io.com/~mccoy/beginning_print.html)

----------------
The opinions expressed in this email are mine alone, and do not
neccesarily represent those of my employer, my parents, or the people
who wrote the email software I use.




[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: Pete Becker <petebecker@acm.org>
Date: 1999/08/25
Raw View
James.Kanze@dresdner-bank.com wrote:
>
> (Note that I am describing an "is" condition, not an as it should be.
> IMHO, conformance should be a more important issue.  Fact is that an
> enormous number of C++ programmers don't even know that there is a
> standard.)
>

Also, an enormous number of C++ programmers think that VC++ is the
standard.

--
Pete Becker
Dinkumware, Ltd.
http://www.dinkumware.com


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: David Binderman <dcb@pncl.co.uk>
Date: 1999/08/26
Raw View
Adam Spragg wrote:
>
> James.Kanze@dresdner-bank.com wrote:
> >
> > (Note that I am describing an "is" condition, not an as it should be.
> > IMHO, conformance should be a more important issue.  Fact is that an
> > enormous number of C++ programmers don't even know that there is a
> > standard.)

Quite right. For many C++ programmers, what the compiler enforces
is the standard.

> Don't know there is a standard in that they don't know the standard has
> been accepted by ISO, or don't know there is a standard in that they
> don't know that a standard was even being written?
>
> If the latter - where did you get this info from? And what are 'enormous
> numbers'? 70%?

I must have met 100-200 C++ programmers over the years. I'd say about
25% are aware of the standard, and about 5% can spot a compiler bug
(ie know the difference between what the compiler is dong and the
standard)

C++ is in the mainstream now.

Regards
dcb
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: brahms@mindspring.com (Stan Brown)
Date: 1999/08/24
Raw View
[about half a dozen newsgroups, including a nonexistent one, removed]

francis@robinton.demon.co.uk (Francis Glassborow) wrote in comp.std.c++:
>But does their source code actually rely on wchar_t being an unsigned
>short.  If so they are going to have a hell of a job providing and ISO
>C++ mode.

Is there any reason to think that Microsoft intend to do so?

All indications are that standard conformance is a VERY low priority for
the company.

--
Stan Brown, Oak Road Systems, Cleveland, Ohio, USA
                                    http://www.mindspring.com/~brahms/
I don't need e-mail copies of posted follow-ups, but if you send
them PLEASE identify them as such.
My reply address is correct as is. The courtesy of providing a correct
reply address is more important to me than time spent deleting spam.
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: Francis Glassborow <francis@robinton.demon.co.uk>
Date: 1999/08/20
Raw View
In article <slrn7rr350.1v.bcombee@bcombee.metrowerks.com>, Ben Combee
<bcombee@metrowerks.com> writes
>Doing a quick test -- it doesn't recognize wchar_t as a builtin
>identifier, even with the /Za switch.  However, including <wchar.h>
>introduces the typedef for both C and C++ when using the MSVC++
>toolset -- a typedef of wchar_t as unsigned short.  So, your overload
>above would work, but the following would not.
>
>void fn(wchar_t);
>void fn(unsigned short);

Thanks for checking.  So VC++ is non-conforming in yet another place
which common sense suggests would have been trivial to fix.



Francis Glassborow      Journal Editor, Association of C & C++ Users
64 Southfield Rd
Oxford OX4 1PA          +44(0)1865 246490
All opinions are mine and do not represent those of any organisation


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: Pete Becker <petebecker@acm.org>
Date: 1999/08/21
Raw View
Francis Glassborow wrote:
>
> Thanks for checking.  So VC++ is non-conforming in yet another place
> which common sense suggests would have been trivial to fix.
>

It wouldn't be trival to fix: the typedef for wchar_t occurs in 16
different header files in the VC++ package, all but one of which are
Windows headers. Who knows how many places in their source code also
have that typedef?

--
Pete Becker
Dinkumware, Ltd.
http://www.dinkumware.com


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: Pete Becker <petebecker@acm.org>
Date: 1999/08/21
Raw View
Pete Becker wrote:
>
> Francis Glassborow wrote:
> >
> > Thanks for checking.  So VC++ is non-conforming in yet another place
> > which common sense suggests would have been trivial to fix.
> >
>
> It wouldn't be trival to fix: the typedef for wchar_t occurs in 16
> different header files in the VC++ package, all but one of which are
> Windows headers. Who knows how many places in their source code also
> have that typedef?
>

Whoops, silly data. Six of the sixteen are Windows or non-standard C
headers. The rest are standard C headers.

--
Pete Becker
Dinkumware, Ltd.
http://www.dinkumware.com


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: "Ken Hagan" <K.Hagan@thermoteknix.co.uk>
Date: 1999/08/23
Raw View
>From Microsoft's stddef.h and ctype.h

#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif

So you chose the wrong overload, but the answer to the question
is basically "no, it doesn't".

Francis Glassborow wrote in message ...
>
>You mean that MSVC++ does not support:
>
>void fn(wchar_t);
>void fn(short);
>
>as a pair of overloaded functions?
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: Esmond Pitt <pitte@cpgen.cpg.com.au>
Date: 1999/08/23
Raw View
James Kuyper wrote:
> ? The C++ standard came into existence for the very first time just
> about a year ago. There were a number of changes even between the last
> public draft and the final approved form.

1. The C++ standard has been in existence in draft forms for
approximately 10 years. I'm counting from the publication in 1990 of
Ellis & Stroustrup's ARM, which was an ANSI base document. Yes, it has
changed, like all drafts, especially around 1994-6, but the content
hasn't changed significantly for 2 years, especially w.r.t. the items
that have been discussed in this thread, and it hasn't changed at all
for the last 12 months because the standard has been published that
long.

2. The differences between Microsoft C++ and ISO/IEC 14882:1998 are far
larger than the differences between the latter and the 1997 draft.

3. M$ have announced no plan to rectify this. That is what the
discussion is about. I don't see why we should all wait passively to see
what they deign to grant us in VC++ 7.x (which BTW is really about
version 20) rather than comment/push/complain/bitch beforehand.

4. If they're so good at listening to customers, I obviously have a duty
to myself to make my requirements known. Otherwise, when they don't meet
them, I only have myself to blame. Of course I don't accept this
reasoning: the reason the ISO/IEC C++ standard exists is precisely to
relieve individuals of this burden.

5. Having representatives on standards committee serves 2 important
purposes for compiler vendors: (a) it gives you an opportunity to push
the language in the direction your customers require, and (b) it gives
you advance notice of the way things are going, i.e. it gives you an
opportunity to come to the market quickly with a compliant
implementation once the standard is finalized. This is SOP in the
language-processor industry. M$ have felt free to do business otherwise
ever since they started mangling C in 1983 or so. Good luck to them.

6. I personally stopped using M$ compilers forever in 1992 and I've
never regretted it.
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: Nick Ambrose <nicka@interdyn.com>
Date: 1999/08/23
Raw View
Francis Glassborow wrote:

> In article <slrn7rlpd4.5t.bcombee@bcombee.metrowerks.com>, Ben Combee
> <bcombee@metrowerks.com> writes
> >One example: Using the wchar_t
> >type mangles as a unsigned short for MS-compatability, but when that
> >is turned off, it gets its own unique type character.
>
> You mean that MSVC++ does not support:
>
> void fn(wchar_t);
> void fn(short);
>
> as a pair of overloaded functions?
>

No, I believe it does not.

Nick
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: Francis Glassborow <francis@robinton.demon.co.uk>
Date: 1999/08/23
Raw View
In article <37BEC472.6E8B0B65@acm.org>, Pete Becker <petebecker@acm.org>
writes
>It wouldn't be trival to fix: the typedef for wchar_t occurs in 16
>different header files in the VC++ package, all but one of which are
>Windows headers. Who knows how many places in their source code also
>have that typedef?

But does their source code actually rely on wchar_t being an unsigned
short.  If so they are going to have a hell of a job providing and ISO
C++ mode.


Francis Glassborow      Journal Editor, Association of C & C++ Users
64 Southfield Rd
Oxford OX4 1PA          +44(0)1865 246490
All opinions are mine and do not represent those of any organisation
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: James Kuyper <kuyper@wizard.net>
Date: 1999/08/19
Raw View
Esmond Pitt wrote:
>
> > On Sun, 15 Aug 1999 12:21:33 -0500, "Erik Funkenbusch" <erikf@visi.com> wrote:
...
> > } I really don't think it's fair to expect compilers to conform to draft
> > } standards though, since things can change at the drop of a hat and require
> > } massive recoding.
> >
>
> Absolute nonsense.
>
> (a) The standard hasn't changed significantly in several years

? The C++ standard came into existence for the very first time just
about a year ago. There were a number of changes even between the last
public draft and the final approved form.

> (b) The other vendors are managing it

I hate to be defending MS, but nobody's achieved complete conformance
with the standard yet. Some vendors are closer than others. Some of the
marketing claims, if not examined closely, could be taken as claims of
complete conformance, but none has yet held up under a detailed
feature-by-feature checklist.
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: "Daniel Parker" <dparker@no_spam.globalserve.net>
Date: 1999/08/19
Raw View
Francis Glassborow <francis@robinton.demon.co.uk> wrote in message
news:4ij70DAxhBu3Ewgb@robinton.demon.co.uk...
> In article <37b9c76b.87132229@news.netvision.net.il>, Alex Oren
> <alexo@bigfoot---filter---.com> writes
> >Several of the features that MSVC is missing were voted on and accepted
buy the
> >committee several
> >years ago.  MS had more than enough time to implement those features.
>
> I think the chances of VC++ ever being conforming are small.  MS are
> heavily constrained by the tens of millions of lines of their own code
> which would require many man years of work to compile with a conforming
> compiler.

Sure, supporting the for scope would break existing code, but I don't think
the same could be said for covariant returns or partial template
specialization, or most parts of the standard for that matter, given where
VC++ is at now.

--
Regards,
Daniel Parker danielp@nshima.com
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: bcombee@metrowerks.com (Ben Combee)
Date: 1999/08/20
Raw View
In article <idLN75AR1+u3EwRO@robinton.demon.co.uk>, Francis Glassborow wrote:
> In article <slrn7rlpd4.5t.bcombee@bcombee.metrowerks.com>, Ben Combee
> <bcombee@metrowerks.com> writes
> >One example: Using the wchar_t
> >type mangles as a unsigned short for MS-compatability, but when that
> >is turned off, it gets its own unique type character.
>
> You mean that MSVC++ does not support:
>
> void fn(wchar_t);
> void fn(short);
>
> as a pair of overloaded functions?

Doing a quick test -- it doesn't recognize wchar_t as a builtin
identifier, even with the /Za switch.  However, including <wchar.h>
introduces the typedef for both C and C++ when using the MSVC++
toolset -- a typedef of wchar_t as unsigned short.  So, your overload
above would work, but the following would not.

void fn(wchar_t);
void fn(unsigned short);

--
Ben Combee <bcombee@metrowerks.com> -- x86/Win32/Linux/NetWare CompilerWarrior


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: Adam Spragg <adam_spragg@novaclarion.com>
Date: 1999/08/19
Raw View
Nick Ambrose wrote:
> Ben Combee wrote:
> > The CodeWarrior x86 compiler makes a large effort to ensure link
> > compatability with VC++, both emulating their C++ name mangling
> > scheme, having the same class layout for single inheritance classes,
> > and supporting the details of their many calling conventions.  There are
> > a few areas that are close to impossible to fix:
>
> Of course, there is a way to turn this stuff off, right ? One purpose of different
> mangling schemes was so that incompatibilites were detected by the linker, not at
> runtime

I understood from his use of the term 'emulating' that the x86
CodeWarrior native implementation of name-mangling is
super^H^H^H^H^Hdifferent from MSVCs, and that the emulation mode is
merely for compatibility purposes.

Adam

--
Apparently [...] police in many lands are now complaining that local
arrestees are insisting on having their Miranda rights read to them,
just like perps in American TV cop shows. When it's explained to them
that they are in a different country, where those rights do not exist,
they become outraged. Starsky and Hutch reruns, dubbed into diverse
languages, may turn out, in the long run, to be a greater force for
human rights than the [United States] Declaration of Independence.
-- Neal Stephenson (Cryptonomicon -
http://www.io.com/~mccoy/beginning_print.html)

----------------
The opinions expressed in this email are mine alone, and do not
neccesarily represent those of my employer, my parents, or the people
who wrote the email software I use.
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: bcombee@metrowerks.com (Ben Combee)
Date: 1999/08/19
Raw View
In article <37B9B51D.32E1377@interdyn.com>, Nick Ambrose wrote:
>> The CodeWarrior x86 compiler makes a large effort to ensure link
>> compatability with VC++, both emulating their C++ name mangling
>> scheme, having the same class layout for single inheritance
>> classes, and supporting the details of their many calling
>> conventions.  There are a few areas that are close to impossible to
>> fix:

> Of course, there is a way to turn this stuff off, right ? One
> purpose of different mangling schemes was so that incompatibilites
> were detected by the linker, not at runtime

No, its not possible to substitute a different layout/mangling scheme
in the general sense -- why bother when the ABI is the same?  However,
for some specific cases, the name mangling does change in CW when you
turn off the "ARM Conformance" option.  One example: Using the wchar_t
type mangles as a unsigned short for MS-compatability, but when that
is turned off, it gets its own unique type character.

--
Ben Combee <bcombee@metrowerks.com> -- x86/Win32/Linux/NetWare CompilerWarrior
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: mwron@metrowerks.com (MW Ron)
Date: 1999/08/19
Raw View
In article <4ij70DAxhBu3Ewgb@robinton.demon.co.uk>, Francis Glassborow
<francisG@robinton.demon.co.uk> wrote:

>Almost any time that I port code from VC++ to another compiler (such as
>CodeWarrior) I find a host of warnings and down-right error messages
>needing attention.

In addition to what Ben mentioned  CodeWarrior has several pragma's and
settings for compatibility with VC++ or other legacy code.  For example
the scope of a variable declared in a for loop statement.  Or inconsistent
use of class and structure.

Ron

--
            ** New Releases **
Discover Programming Starter Kit (Mac & Windows) 5.0
CodeWarrior for Java 5.0 * CodeWarrior for SuSE Linux 4.0
CodeWarrior Professional 5.0 (Mac & Windows)
CodeWarrior Professional Academic  5.0
       http://www.metrowerks.com
METROWERKS - Ron Liechty - MWRon@metrowerks.com
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: Esmond Pitt <pitte@cpgen.cpg.com.au>
Date: 1999/08/19
Raw View


> On Sun, 15 Aug 1999 12:21:33 -0500, "Erik Funkenbusch" <erikf@visi.com> wrote:
>
> } Alex Oren <alexo@bigfoot---filter---.com> wrote:
> }
> } > Please see:
> } >   http://www.wdj.com/current/bug.html
>
> } Pretty much old news.
>
> One more reason to nag and complain!
>
> } I really don't think it's fair to expect compilers to conform to draft
> } standards though, since things can change at the drop of a hat and require
> } massive recoding.
>

Absolute nonsense.

(a) The standard hasn't changed significantly in several years
(b) The other vendors are managing it
(c) Microsoft had, or should have had, a member on the ANSI/ISO
committee, again like all the other vendors.

Obviously Microsoft regards VC++ as a proprietary language and is not
interested in the ANSI/ISO standard for C++.

Proceed accordingly.


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: bcombee@metrowerks.com (Ben Combee)
Date: 1999/08/19
Raw View
In article <37BAD694.E89585ED@novaclarion.com>, Adam Spragg wrote:
> I understood from his use of the term 'emulating' that the x86
> CodeWarrior native implementation of name-mangling is
> super^H^H^H^H^Hdifferent from MSVCs, and that the emulation mode is
> merely for compatibility purposes.

Our mangling scheme used on the Macintosh and in our embedded tools is
similar to Stroustrup's original scheme and the one used by GCC,
although with our own extensions.  The one used on the Win32 compiler
is mostly compatible with Microsoft's VC++ scheme.  I used the term
"emulate" as defined by "to equal or approach equality with".

Architecturally, the code to implement these schemes is just another
source file in the compiler -- one is picked at compiler build time,
and that is what is used.  It could be possible for us to build a
Win32 compiler with both schemes, but we don't see any advantage in
supporting two different schemes when one had no major advantage over
the other.

--
Ben Combee <bcombee@metrowerks.com> -- x86/Win32/Linux/NetWare CompilerWarrior


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: "Earl Malmrose" <earl@nospam.malmrose.com>
Date: 1999/08/19
Raw View
MW Ron <mwron@metrowerks.com> wrote in message
news:mwron-1808991747040001@c243286-a.bcreek1.mi.home.com...
> In addition to what Ben mentioned  CodeWarrior has several pragma's and
> settings for compatibility with VC++ or other legacy code.  For example
> the scope of a variable declared in a for loop statement.  Or inconsistent
> use of class and structure.

How about using "friend foo;" instead of "friend class foo;". VC++ allows
the former, CW requires the latter. Is VC++ wrong in allowing the "class" to
be omitted?



[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: Francis Glassborow <francis@robinton.demon.co.uk>
Date: 1999/08/19
Raw View
In article <slrn7rlpd4.5t.bcombee@bcombee.metrowerks.com>, Ben Combee
<bcombee@metrowerks.com> writes
>One example: Using the wchar_t
>type mangles as a unsigned short for MS-compatability, but when that
>is turned off, it gets its own unique type character.

You mean that MSVC++ does not support:

void fn(wchar_t);
void fn(short);

as a pair of overloaded functions?


Francis Glassborow      Journal Editor, Association of C & C++ Users
64 Southfield Rd
Oxford OX4 1PA          +44(0)1865 246490
All opinions are mine and do not represent those of any organisation
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: alexo@bigfoot---filter---.com (Alex Oren)
Date: 1999/08/16
Raw View
On Sun, 15 Aug 1999 12:21:33 -0500, "Erik Funkenbusch" <erikf@visi.com> wrote:

} Alex Oren <alexo@bigfoot---filter---.com> wrote:
}
} > Please see:
} >   http://www.wdj.com/current/bug.html

} Pretty much old news.

One more reason to nag and complain!

} I really don't think it's fair to expect compilers to conform to draft
} standards though, since things can change at the drop of a hat and require
} massive recoding.

I beg to differ.

1) Many ISO committee members repeatedly posted on comp.std.c++ and comp.lang.c++.moderated that the
changes between the draft standard and the final standard were expected to be (and now proven to be)
very minor.

2) Many compilers have a much better level of conformance.
Examples:
    Intel's VTune
    IBM VisualAge C++
    Borland C++ builder
    Comeau C++
    KAI C++
    Metrowerks C++
    GCC
    and others...

If they could do it, why couldn't MS?  (The answer: they wouldn't.  That's why I complain).

Also see:
    http://animal.ihug.co.nz/c++/compilers.html
    http://www.edg.com/cpp_ftrs.html

} I think MS is in a position to determine how much work it takes to implement a draft standard feature.

The electronic copy of the *final* standard I purchased from the ANSI site says:

    INTERNATIONAL STANDARD
    ISO/IEC 14882
    First edition 1998-09-01

The standard was frozen (feature-wise) before that date.

} If that work is significant, I
} certainly would put it at the bottom of the list until such a time as the
} standard is ratified.

Several of the features that MSVC is missing were voted on and accepted buy the committee several
years ago.  MS had more than enough time to implement those features.

In particular, the feature mentioned in http://www.wdj.com/current/bug.html was set in stone

} Now that the standard is ratified, I'd expect the next version of VC to
} implement these features.  If not, then it's time to complain (and complain
} loudly)

The time to complain way a year ago.  I'm still complaining.  Will you complain too?

} although I don't think VC7 will be 100%, it should be close.
} From what I hear, you can expect VC7 in first quarter next year.

>From what I hear, IBM's VisualAge is practically 100% conforming (modulo possible bugs).


I strongly urge you to check this:
    http://www.deja.com/=dnc/getdoc.xp?AN=470891293

Written by Andrew Koening, relevant part quoted below, emphasis is mine:

> It is unrealistic to expect a C++ compiler to conform perfectly to
> the standard, because every nontrivial program has bugs.  Therefore,
> from a pragmatic viewpoint, a major part of any true measure of
> performance must include the vendor's attitude.  The main question
> is whether the vendor considers deviations from the standard to be
> bugs that the vendor is willing to fix.  If so, the compiler will
> eventually approximate the standard closely enough to be useful.
> If not, it won't.
>
> By that measure, a compiler that has *deliberately* missing features
> is not conforming, because the vendor does not intend to make it so.


Have fun,
Alex.

--
My email address is intentionally mangled to foil spambots.
Please remove the "---filter---" from the address for replying.
Sorry for the inconvenience.
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: Francis Glassborow <francis@robinton.demon.co.uk>
Date: 1999/08/17
Raw View
In article <37b9c76b.87132229@news.netvision.net.il>, Alex Oren
<alexo@bigfoot---filter---.com> writes
>Several of the features that MSVC is missing were voted on and accepted buy the
>committee several
>years ago.  MS had more than enough time to implement those features.

I think the chances of VC++ ever being conforming are small.  MS are
heavily constrained by the tens of millions of lines of their own code
which would require many man years of work to compile with a conforming
compiler.

Their internal coding standards have, IMO, hung a millstone round their
necks, and around those of their customers.  MS development tools are
the outstanding example of the vendor lock-in anti-pattern.  It should
be noted that MS applications are probably the biggest single customer
of MS development tools.

Even silly things like their use of Hungarian Notation adversely
influence their development tools.

Almost any time that I port code from VC++ to another compiler (such as
CodeWarrior) I find a host of warnings and down-right error messages
needing attention.  If I had a million line project to manage, these
would heavily persuade me to stick with VC++.  VBasic is already their
proprietary product (though versions are mutually incompatible, MS seem
to have little idea of portability over time) and they do what they like
with it, and if the customer doesn't like it, tough.  They seem to be
attempting to do the same to Java as they have to C++.  Personally I
think there is considerable evidence that MS development tools are
deliberately making it difficult and expensive for developers to change
to rival products.

A major service by Inprise and Metrowerks would be to ensure that code
compiled with their products could (with suitable compile time switches)
link with all third party libraries shipped for VC++ developers.


Francis Glassborow      Journal Editor, Association of C & C++ Users
64 Southfield Rd
Oxford OX4 1PA          +44(0)1865 246490
All opinions are mine and do not represent those of any organisation
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: bcombee@metrowerks.com (Ben Combee)
Date: 1999/08/17
Raw View
In article <4ij70DAxhBu3Ewgb@robinton.demon.co.uk>, Francis Glassborow wrote:
> A major service by Inprise and Metrowerks would be to ensure that code
> compiled with their products could (with suitable compile time switches)
> link with all third party libraries shipped for VC++ developers.

The CodeWarrior x86 compiler makes a large effort to ensure link
compatability with VC++, both emulating their C++ name mangling
scheme, having the same class layout for single inheritance classes,
and supporting the details of their many calling conventions.  There are
a few areas that are close to impossible to fix:

1) compiler support functions -- we can't clone the private,
undocumented interfaces into their runtime library, so often, static
libraries will not be able to link with CodeWarrior code when they
depend on the internals of msvcrt.lib.

2) Standard library internals -- The standard library in both C and
C++ gives the implementor freedom to change the internal
representation of structures like FILE.  If a VC++ library uses
getchar(), for example, it could get dependencies on a particular
internal piece of stdio that is differently implemented in
CodeWarrior.

DLLs are generally a lot more successful, since usually these
dependencies are already dealt with through the limited interface.
We've already had several success stories here -- I just heard from a
customer that was able to develop Lotus Notes plugins with the Win32
CodeWarrior using the supplied VC++ libraries.

--
Ben Combee <bcombee@metrowerks.com> -- x86/Win32/Linux/NetWare CompilerWarrior
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: Nick Ambrose <nicka@interdyn.com>
Date: 1999/08/18
Raw View

Ben Combee wrote:

> In article <4ij70DAxhBu3Ewgb@robinton.demon.co.uk>, Francis Glassborow wrote:
> > A major service by Inprise and Metrowerks would be to ensure that code
> > compiled with their products could (with suitable compile time switches)
> > link with all third party libraries shipped for VC++ developers.
>
> The CodeWarrior x86 compiler makes a large effort to ensure link
> compatability with VC++, both emulating their C++ name mangling
> scheme, having the same class layout for single inheritance classes,
> and supporting the details of their many calling conventions.  There are
> a few areas that are close to impossible to fix:
>

Of course, there is a way to turn this stuff off, right ? One purpose of different
mangling schemes was so that incompatibilites were detected by the linker, not at
runtime

Nick




[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]