This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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 draft] Fix libstdc++/8610


Paolo Carlini wrote:

I see, in principle. However, for some reason,, we don't get any warning
at build time (-Wall), neither compiling actual code (try the attached
test64.cc -Wall -Wextra, f.i.). I don't know exactly /why/ at the moment,
I should, but this makes things much easier... ;)

I again Andreas and everyone. A little experiment: try compiling this:


#include <unistd.h>

int main()
{
 lseek64(1, 0, 1);
}

both as an *.cc and as an *.c file. Indeed, as warned by Andreas, the C
front end spits:

paolo:~> gcc -Wall no-proto.c
no-proto.c: In function `main':

no-proto.c:5: warning: implicit declaration of function `lseek64'
no-proto.c:6: warning: control reaches end of non-void function

On the other hand, /nothing/ happens for the C++ front end. I think the
specifics of C++ about prototypes are making my life easier...

Paolo.


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