Re: [xml] AIX 4.3.2 compile error with 2.4.2



On Thu, Aug 16, 2001 at 03:12:35PM -0700, Darin Adler wrote:
On Thursday, August 16, 2001, at 12:32  PM, Daniel Veillard wrote:

On Thu, Aug 16, 2001 at 02:22:15PM -0500, xml thewrittenword com wrote:
Is this valid C89 code? I passed this through GCC 2.95.3 and 3.0 with
-ansi -pedantic and it worked.

BTW, IRIX cc gives:

cc-3303 cc: WARNING File = ./include/libxml/HTMLparser.h, Line = 61
  A type qualifier on a return type is meaningless.

  Meaningful to me and gcc:
    the function returns a pointer to an immutable memory region,
warn if it is affected.

A pointer to an immutable memory region would be "const htmlEntityDesc *", 
and there would be no warning. What you have there now, "const 
htmlElemDescPtr", gives you an immutable pointer to a mutable memory 
region -- it's equivalent to "htmlEntityDesc * const", and it is 
meaningless for a return type.

I tried this and the IBM C compiler accepted it. Thanks!

-- 
albert chin (china thewrittenword com)




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