This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Clean-up C's builtin function type matching.


On Sun, 20 Jul 2003, Roger Sayle wrote:
> Continuing in my current run of improvements to GCC's builtin function
> handling, the following patch tidies up the fuzzy type checking code
> for builtin functions in the C front-end's duplicate_decls.

That's really a coincidence, seeing this patch after just discussing a
related issue with the FreeBSD guys who just updated their system compiler
to GCC 3.3 and experienced a regression. ;-)

Consider the following program:

  extern int exp;

  int main() {
    int sin=1;
    return sin+exp;
  }

Plain gcc issues
  x.c:1: warning: built-in function `exp' declared as non-function
and gcc -Wshadow issues
  x.c:1: warning: built-in function `exp' declared as non-function
  x.c: In function `main':
  x.c:4: warning: declaration of `sin' shadows a global declaration
  <built-in>:0: warning: shadowed declaration is here
all of which I have been told are wrong as long as <math.h> hasn't been
#included.

Would you mind having a look at this?

Gerald


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]