make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug report: Compile with Microsoft and Intel compiler


From: Paul D. Smith
Subject: Re: Bug report: Compile with Microsoft and Intel compiler
Date: Fri, 29 Apr 2005 08:28:03 -0400

%% "Eli Zaretskii" <address@hidden> writes:

  >> Well, this is kind of bogus, but there's nothing wrong with this
  >> either that warrants an error.

  ez> The error is just because the compiler was invoked with the
  ez> equivalent of -Werror.  The warning is justified since `struct
  ez> token' is not defined anywhere.

That's perfectly legitimate though.  In fact, I use this all the time in
some projects to provide anonymous, but typed, pointers in C.  If you
use void* then that pointer can be assigned/passed to any other pointer
value without any warning by the compiler.  If you create a pointer to a
struct, even an undefined struct, then the compiler will complain if you
assign that value to a pointer of a different type (other than void* of
course).

  ez> Why do we need that struct? can it be removed, or replaced with a
  ez> defined data type?

This code (hash.c and hash.h) is lifted essentially verbatim from the
GNU id-utils package.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]