[Bug c++/39211] Function pass by reference problem, accepts parameters (int, int) to an (int*, int*) function.
eakrohn at cs dot uiowa dot edu
gcc-bugzilla@gcc.gnu.org
Tue Feb 17 03:53:00 GMT 2009
------- Comment #1 from eakrohn at cs dot uiowa dot edu 2009-02-17 03:53 -------
My concern is this function
swap(int *x, int *y){ ... }
with this function call
int x = 5, y = 7;
swap(x,y);
compiles and works just fine. But this function
swap(int *x){ ... }
with this function call
int x;
swap(x);
is a compile error. It's not consistent.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39211
More information about the Gcc-bugs
mailing list