[Bug c/105369] Improved diagnostics for code from statement expressions documentation [C component]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105369 Eric Gallager changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=6906 --- Comment #5 from Eric Gallager --- oh wait it looks like the "assertion with side effects" part is actually bug 6906; I'm keeping this bug open for the remaining parts, though
[Bug c/105369] Improved diagnostics for code from statement expressions documentation [C component]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105369 --- Comment #4 from Jonathan Wakely --- The preprocessor can't tell if an expression has side effects. I have no idea how easy it would be (or if it's even possible) for the front end to tell that an expression was duplicated from a single macro argument.
[Bug c/105369] Improved diagnostics for code from statement expressions documentation [C component]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105369 --- Comment #3 from Eric Gallager --- (In reply to Eric Gallager from comment #0) > Anyways, that's it for the plain-C code from that page; I'll open a separate > bug for the C++ if it turns out that that needs one, too. OK I opened bug 105370 for that. (In reply to Andrew Pinski from comment #2) > I don't think there is a way to get a warning for the abs really and maybe > not even wanted. OK so forget that part I guess; how about the rest of it?
[Bug c/105369] Improved diagnostics for code from statement expressions documentation [C component]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105369 --- Comment #2 from Andrew Pinski --- I don't think there is a way to get a warning for the abs really and maybe not even wanted. There should definitely be a cross reference to where the documentation says inline functions are fast as macros if there is not already one.
[Bug c/105369] Improved diagnostics for code from statement expressions documentation [C component]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105369 --- Comment #1 from Eric Gallager --- Oh, I should probably add something to test the sentence that says, "If you don’t know the type of the operand, you can still do this, but you must use typeof or __auto_type (see Typeof)," too...