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] |
void debug (const char * string) { return; }
int f() { ( true == false ? 0 : debug ("Some string")); return 0; }
error: debug(((const char*)"Some string")) has type void and is not a throw-expression
error: 'debug(((const char*)"Some string"))' of type 'void' is incompatible with '0' of type 'int'
Bootstrapped and regression tested with --enable-languages=all on i686-pc-linux-gnu.
PR c++/28943 cp/ * call.c (build_conditional_expr): Improve error message. testsuite/ * g++.dg/warn/pr28943.C: New.
Attachment:
void-nonvoid-in-conditional.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |