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] |
This extends' static assert to not require a message string.I elected to make this work also for C++11 and C++14 and warn only with -pedantic.
I think many people just write static_assert(thing, ""); . I took the path of building an empty string in the parser in this case.I wasn't sure if setting message to NULL_TREE would cause sadness later on or not.
I also, perhaps in a fit of overzealousness made finish_static_assert not print the extra ": " and an empty message in this case.
I didn't modify _Static_assert for C. Built and tested on x86_64-linux. OK
Attachment:
CL_static_assert_nomsg
Description: Text document
Attachment:
patch_static_assert_nomsg
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |