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] |
On 10/21/2015 10:04 AM, Bernd Schmidt wrote:
To avoid conditionally compiled code. I'm of the opinion we should be stomping out as much as we reasonably can.On 10/21/2015 05:56 PM, Jeff Law wrote:The problem is the existing ENABLE_CHECKING conditions. Anything which is #ifdef ENABLE_CHECKING will have its behavior changed if we change things so that ENABLE_CHECKING is always defined with a value. So if we wanted to continue to use ENABLE_CHECKING, but with a value, then every #ifdef has to be fixed all-at-once.But why change it to have a value? Just keep it as-is, and use flag_checking for runtime tests.
Essentially each blob of code that is conditionally compiled represents two paths that can't be tested for basic syntax correctness together. As a result we regularly see one of the two paths being broken from a syntax point of view.
By stomping out the conditionally compiled code a standard build will test both paths for basic syntax correctness. It'll take time to get there, but that's where things, IMHO, need to go to help reduce the long term cost of maintenance.
jeff
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |