Author Topic: CompilerLineType (compiler.h) needs a new type  (Read 2877 times)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
CompilerLineType (compiler.h) needs a new type
« on: June 02, 2007, 11:12:34 pm »
Code
enum CompilerLineType
{
    cltNormal,
    cltWarning,
    cltError
};

I've seen that sometimes the GCC compiler outputs lines needed to understand an error message. For example: "In function", "In member function"... "Instantiated from xxyyzz" and "Instantiated from here". These don't show up in the compiler messages, one has to skip to the build log to understand them and have to switch back and forth to locate the source of an error.

I propose adding a new type:

Code
enum CompilerLineType
{
    cltIgnore,
    cltNormal,
    cltWarning,
    cltError
};

or perhaps:


Code
enum CompilerLineType
{
    cltNormal,
    cltInfo,
    cltWarning,
    cltError
};

for these situations. In some cases where the compiler gives a lot of "instantiated from..." messages for one warning, we can't have 6,7 or 8 different warnings reported (and in blue, eew). The problem is that I don't know what could break when adding them. Also, it disturbs me that for some checks, the exact comparison with cltNormal is used, instead of using greater than comparisons, which would be more adequate.

Thoughts, opinions?