This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/19994] warn on parameter name mismatch
- From: "schlie at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Feb 2005 12:36:43 -0000
- Subject: [Bug c/19994] warn on parameter name mismatch
- References: <20050216043359.19994.cyeoh@samba.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schlie at comcast dot net 2005-02-16 12:36 -------
(In reply to comment #4)
To be more clear (independant of what most may or may not do, or rely upon), as within the body
of a function definition, given that parameters are referanced by their symbolic name, not postion:
int apples_per_basket ( int apples, int baskets );
int function ( int baskets, int apples) {
return apple / baskets;
/* i.e. not: return %0 - %1; referancing parameters by order not name, which C doen't support */
}
Then it's reasonable to assume that if a prototype were declared with symbolic names which are
inconsistent with the function's definition, it is quite reasonable to expect, if not desire, warning.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19994