Hello, I have just finished fixing up a piece of code dating from around 2001 which was quite badly broken by the incompatible change of __FUNCTION__ to no longer operate as a preprocessor constant.
Unfortunately this codebase is riddled with constructs like fatal_error(__FUNCTION__": foo"); This is not done in a macro. This sort of thing appears many times throughout the source. I understand removing it simplified GCC. That is good. Unfortunately by saving work for yourselves you made much more work for many other people. I see from Google that Andrew Morton simply used old compilers when faced with this problem before. As recent releases have broken more and more code, I would like to understand what GCCs policy on source compatibility is. Sometimes the code was buggy, in this particular case GCC simply decided to pull an extension it has offered for years. Is it documented anywhere? Are there any more planned breakages? How do you make the cost:benefit judgement call? Are there any guidelines you follow? Typically a warning was emitted for a release or two before but this achieves little: old unmaintained code, or code too large/fragile to fix up, will not be fixed anytime soon. In other cases people like me must spend our spare time doing boring mechanical work for no obvious reason, so it is usually left until it actually starts causing compiles to fail. This is quite depressing. In cases where breaking sources lets you achieve greater performance or efficiency, please do make the change but offer a switch to disable it and let the old code still compile. This way we it seems everybody can be happy. thanks -mike