bug-grep
[Top][All Lists]
Advanced

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

Re: grep-2.5.4-20090203 compilation issues


From: Karl Berry
Subject: Re: grep-2.5.4-20090203 compilation issues
Date: Mon, 9 Feb 2009 12:11:37 -0600

As for these errors:

    >   "search.c", line 284: void function cannot return value
    >   "search.c", line 289: void function cannot return value
    >   "search.c", line 294: void function cannot return value

Line 284 is:
  return GEAcompile (pattern, size,

Where GEAcompile is defined conditionally above, around line 187, and
one of the two ways is:

/* No __VA_ARGS__ in C89.  So we have to do it this way.  */
static COMPILE_RET
GEAcompile (char const *pattern, size_t size, reg_syntax_t syntax_bits)

And COMPILE_RET is #define'd to VOID in grep.h (line 32).

Therefore it seems the compiler is diagnosing a real mistake and the
solution is not to "return" the void value of GEAcompile at all.

Why gcc doesn't complain about it, I don't know.  No doubt there is some
warning option for it.

    Note that these issues existed in grep-2.5.3. I think it is
    important to fix them in grep 2.6, but less critical that they're
    fixed in grep-2.5.4.

I agree, in principle ...

karl




reply via email to

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