Re: gcc vs. g++: really strange behaviour
On Tue, 2004-08-31 at 00:43, Kurt Roeckx wrote:
> Why don't people look at warnings when they get them?
> Your piece of code generated 2 warnings (if turned on) when
> compiled as C because C assumes types when you do not declare a
> In C++ it's even an error to not declare function.
I do care about warnings and of course it's clear to me that things
won't work when there are undeclared functions. I just somehow got on
the wrong track here... I tried to reproduce what was crashing gftp and
isolated the code - that was when I noticed that the very same code
worked with c++ (ptsname declared), but not with c (ptsname not
declared). So I thought it might be a bug in gcc, but obviously I was
wrong with that.
Anyways, putting #define _GNU_SOURCE in two files fixed all the problems
and I mailed that tiny patch to the author.
So, thanks for your help and sorry for bugging you with this.