Re: does VS C++ 2005 actually work????



BTW, I really hate the DWORD_PTR, INT_PTR naming convention. Although they
may be the same size as a pointer, they have nothing logically to do with
pointers and I think the name is misleading.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:cn2192hfpkhjim33g9uvb85hl6o4iqnn08@xxxxxxxxxx
I have no problem with warning messages, particularly when the consequences
can be
serious. But confusing extern "C" with actual C interfaces demonstrates
that the concept
is overloaded; perhaps it should be extern "nomangle" when you want a C++
method that
isn't name-mangled. I tend to compile at high levels of optimization for
product code,
and it is VERY annoying that Microsoft never understood signed-vs-unsigned
(exactly WHAT
does it mean to have a negative index of a 0-based array?), and now we
have a problem of
sizeof() and size_t generating warnings when used in the context of API
calls that only
accept a DWORD length (and some of them should have been modified to
accept DWORD_PTR
values!). So my product code often has a lot of gratuitous casts to
suppress these
warnings, and that often scares me because it opens the opportunity for
actual bugs to
sneak through. But I believe that every build should be "warning-free" at
W4 level. I
also heavily use lint; usually when I run it, I find a dozen or two bugs
in the code I'm
sent (I never even start a new project where someone sends me the code if
I can't compile
it W4 and get a reasonably low count of warnings from lint).

I absolutely despise the assumption that a function can be called without
a prototype and
the assumption that int is a default return type. Fortunately, I believe
both of these
are not only deprecated, but will actually be removed from the next C
standard.
joe

On Wed, 14 Jun 2006 09:55:51 -0600, "Jonathan Wood"
<jwood@xxxxxxxxxxxxxxxx> wrote:

Of course, this is a different issue from those raised by the OP.

But I've also dealt with these tons of new warnings. On the one hand, it's
irritating to have to deal with tons of warnings in working code. But on
the
other hand, I think the goal is worthwhile. Microsoft gets a lot of
justified criticism regarding the reliability of Windows. Most of these
problems are due to faulty software running on Windows, most written by
folks who would claim they know how to program just fine.

Early versions of C compilers did not warn when unprototyped functions
were
called. The compiler just assumed undefined functions returned an int.
Over
the years, compilers have got more and more picky in an effort to impose
additional type safety. I think it is reasonable to expect this trend to
continue.
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm


.



Relevant Pages

  • RE: Redhat 9.0 development environment wierdness...
    ... It still has the warnings you posted. ... setup depends on you or the project you are trying to compile. ... Redhat 9.0 development environment wierdness... ... need to install on our servers and if I can't even get through these I ...
    (RedHat)
  • Re: 2.6.23.9-rt13
    ... If I compile -rt13 I get some compile warnings on ARM: ... Both warnings are fixed by the attached patch, but warning 2 needs some review. ... New changes by Steven Rostedt, Gregory Haskins, ... Revert lazy disable irq from simple irq handler ...
    (Linux-Kernel)
  • Re: <ftream> errors under g++ 3.2.2
    ... > gives error messages about implicit typenames being deprecated, ... is nothing you can do to your code to prevent the warnings. ... From your output, I don't see compile failures, I see warnings. ... I am surprised that a GCC header would have an implicit ...
    (freebsd-current)
  • Re: Using unused variables
    ... I get loads of "unused variable" warnings during compile ... Compiler switches that disable reporting of unused variables are out of ... which may draw dead code diagnostics from aggressive optimizing compilers. ...
    (comp.lang.fortran)
  • Re: does VS C++ 2005 actually work????
    ... I tend to compile at high levels of optimization for product code, ... sizeofand size_t generating warnings when used in the context of API calls that only ... But I've also dealt with these tons of new warnings. ... justified criticism regarding the reliability of Windows. ...
    (microsoft.public.vc.mfc)