Re: How can this odd warning be fixed?

From: Hendrik Schober (SpamTrap_at_gmx.de)
Date: 02/13/04


Date: Fri, 13 Feb 2004 11:28:03 +0100

Ted Byers <r.ted.byers@sympatico.ca> wrote:

  Hi Ted!

> Whenever I use VC++6 with the STL, I get the warning C4786 [...]

  Yeah, that's an annoying one.

> Understand, most of the development I have done over the past few years has
> been with Borland's prodcut, along with some experimentation with Gnu's gcc:
> both of which seem to be more ANSI compliant than VC++6 (which isn't
> surprising given the age of VC++6 and when the standard was established).
> But, I have Visual Studio 6, and need to get a feel for it, so when my
> budget allows, I can upgrade to the latest version of Visual Studio with a
> minimum of pain.

  If you are aiming for less painregarding the
  C++ std lib, buy the much improved std lib
  version for VC6 from Dinkumware. It eases
  using the std lib as much as possible in VC6.
  If you are aiming for the minimum of pain,
  upgrade to VC7.1 right now. I have wasted a
  lot of time on making templates compile with
  VC6, only to find that in the end it having
  it getting compiled doesn't mean it does what
  it is supposed to do.

> But, the code that generates this warning would not generate such a warning
> with the other tools I use. With the compiler truncating an identifier, is
> there not a risk of name collisions?

  It would, if it wasn't only in the debugging
  info.
  (But there is indeed another warning hinting
  that the symbol got cut down. And I found VC6
  sometimes calling into the wrong instance of
  a template function...)

> Is there anything I can do to prevent
> VC++ from truncating names? If not, what is the best practice to work
> around this issue, especially to prevent VC++ from hiding other problems in
> all the verbiage produced by this warning?

  We have a couple of setup headers that are
  in all of our code. One deals with the
  compiler and disables this warning for VC.

> Can I assume this problem no
> longer exists in the latest version of VC++?

  That would be good, wouldn't it? However,
  you cannot. We still have to turn it off
  in VC7.1!

> Thanks,
>
> Ted

  Schobi

-- 
SpamTrap@gmx.de is never read
I'm Schobi at suespammers dot org
"Sometimes compilers are so much more reasonable than people."
  Scott Meyers


Relevant Pages

  • Re: Moving to MSVC++.Net
    ... >> LIB folders from VC6. ... It requires tweaking a few VC6 MFC headers to make ... An easier way to get Visual Studio 2003 and 2005 C/C++ compilers to build ... You won't be able to use the 64-bit compiler bundled with the PSDK on your ...
    (microsoft.public.vc.mfc)
  • Re: Visual C++ 6.0 & Visual C++ Toolkit 2003
    ... 2003 Toolkit compiler. ... Assuming Visual Studio 2003.NET uses the same C++ compiler as the free 2003 Toolkit is it possible to make Visual Studio 2003.NET point the include/lib folder path to Visual C++ 6.0 ones? ... As I recall, I used the VC6 MFC libs and the VS2003 C/C++ ones. ...
    (microsoft.public.vc.mfc)
  • Re: Sort Based on locale
    ... > the following error and warning can anybody help me in debugging ... Iam new to STL help me: ... VC6, necessitated by the limitations of the compiler. ...
    (microsoft.public.vc.stl)
  • Re: do{...}while(0) ???
    ... imagine this being the official standpoint of Microsoft. ... in my Visual Studio 2005 C compiler I do not get a warning: ... Those are not the same and no I don't get a warning. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Compiler warning when casting from a pointer to an integer
    ... The Visual Studio compiler generates this ... > The warning is generated as the pointer is apparently 64 bits long ... > bit base pointer, and i assume thats where the full 64 bits has come ... Visual Studio warns you against a dangerous casting. ...
    (comp.lang.cpp)

Loading