This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] | |
[...]+ static double_int make (unsigned HOST_WIDE_INT cst); + static double_int make (HOST_WIDE_INT cst); + static double_int make (unsigned int cst); + static double_int make (int cst);
Btw, if HOST_WIDE_INT == int the above won't even compile.
Is that true of any host? I am not aware of any. Anyway, it is moot if we remove the overloads.
Right. I'd simply rely on int / unsigned int promotion to HOST_WIDE_INT or unsigned HOST_WIDE_INT and only provide overloads for HOST_WIDE_INT kinds anyway.
void f(long);
void f(unsigned long);
void g(int x){f(x);}e.cc: In function ‘void g(int)’: e.cc:3:18: error: call of overloaded ‘f(int&)’ is ambiguous e.cc:3:18: note: candidates are: e.cc:1:6: note: void f(long int) e.cc:2:6: note: void f(long unsigned int)
-- Marc Glisse
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |