Jeroen Demeyer on Mon, 25 Jan 2016 08:02:57 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PATCH] Guard stack size warnings with DEBUGMEM


On 2016-01-24 23:49, Bill Allombert wrote:
However this breaks backward compatibility, since users could
have set it to 0 in their .gprc, etc.
Sure, but I don't think that backwards compatibility for warnings is so important. Besides, what makes you think that users *want* to see those warnings anyway?

This patch is activating by default some warnings that used to be
only activated when DEBUGMEM>0.
That is trivially solved by changing the debug levels in the code: we could change all code of the form
"if (DEBUGMEM > 0)" to "if (DEBUGMEM > 1)" or more generally change
"if (DEBUGMEM > i)" to "if (DEBUGMEM > i+1)".

In any case I do not think it makes sense to change the interface each
time someone would like to silence a warning.
But this is a "warning" which can occur when nothing special happens. A warning is supposed to actually *warn* about something. This "stack size changed to..." is more like an informative message and not a warning.

We need a global solution for this, preferably with a better
granularity.
Perhaps it makes sense to do this *in addition*. Even if you add an option to silence all warnings, it would still make sense to not always show the stack size warnings. I want to see warnings when I'm doing something stupid or dangerous, but I don't want to see a "warning" just because I changed the stack size.

Jeroen.