[lug] [OT] gcc possible bug

Daniel Webb lists at danielwebb.us
Sat Oct 9 19:33:01 MDT 2004


I would just send this to the gcc bug list, but every time I've done that
except one, it turned out I'm just an idiot and didn't see some obvious mistake
I'm making.  So I'll send it to you guys/gals first for a sanity check.

test.c:

#include<stdbool.h>
typedef double real;

extern real model_get_point_error(
      int run_index,
      int data_index,
      bool discrete_mode,
      real time);

int main(void)
{
  real time;
  int run_index;
  model_get_point_error(time, run_index, time, false);
  return 1;
}

$ gcc -c -Wall test.c -o test.o
$

Nothing printed, and test.o is generated.  What's the deal, it's obviously the
wrong parameters, and it should also warn me that I'm ignoring the return
value.  I've tried with Debian gcc 3.3.4-2 and gcc's newest point release
3.4.2 and it's the same result.  This is really bad for me, because I rely too
much on my compiler telling me when parameter arguments are the wrong type!

Thanks,
Daniel



More information about the LUG mailing list