This is the mail archive of the gcc-help@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] | |
Matthew Woehlke wrote:Ah, yes, inline better than macro :-). I'd note that, from your example usage, it sounds like your return should also be const.
No, we have to return non-const, because many uses of this macro/function are putting the result in a non-const variable. Returning non-const is safe even if the lvalue accepting the result is const, but the reverse generates a warning.
-- Matthew Please do not quote my e-mail address unobfuscated in message bodies. -- No .sig for you! NEXT! -- Unknown
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |