[Bug c/19994] warn on parameter name mismatch

schlie at comcast dot net gcc-bugzilla@gcc.gnu.org
Wed Feb 16 17:02:00 GMT 2005

------- 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.



More information about the Gcc-bugs mailing list