This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GNU C: Implicit int and implicit function definitions
- From: "lh mouse"<lh_mouse at 126 dot com>
- To: "Florian Weimer"<fweimer at redhat dot com>, "GCC"<gcc at gcc dot gnu dot org>
- Date: Fri, 20 May 2016 16:30:21 +0800
- Subject: Re: GNU C: Implicit int and implicit function definitions
- Authentication-results: sourceware.org; auth=none
- References: <2dd49b4d-0722-bbcd-0e0d-dd6eb690e43d at redhat dot com>
Implicit function declarations result in warnings since C99 or GNU99 and '-pedantic-errors' turns them into errors.
The same goes for implicit return types.
------------------
Best regards,
lh_mouse
2016-05-20
-------------------------------------------------------------
åääïFlorian Weimer <fweimer@redhat.com>
åéææï2016-05-20 16:17
æääïGCC
æéï
äéïGNU C: Implicit int and implicit function definitions
I just spend an hour hunting down someone else's GCC code generation
bug, when it turned out it was caused by an implicit function
definition, where the real return type was incompatible with int.
C99 got rid of implicit function definitions and implicit ints. Would
it be possible to remove them retroactively from the -std=gnu99 and
-std=gnu11 language variants (as well as -std=c99 and -std=c11), so that
they are rejected by default?
Thanks,
Florian