Can someone please explain this macro definition?
问题 The macro definition is as follows: #define open_listen_fd_or_die(port) \ ({ int rc = open_listen_fd(port); assert(rc >= 0); rc; }) open_listen_fd() is a function, that returns integer value. My question: What is the significance of third statement rc; ? 回答1: You're looking at a gcc extension that allows you to treat multiple statements as a single expression. The last one needs to be an expression that is used as the result of the entire thing. It's meant for use in macros to allow the