Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Detecting "unrecognized command line option" errors with GCC

(1/2) > >>

oBFusCATed:
Is it possible to add a regexp for this kind of errors?
The problem is that the error is not shown in the Build messages tab, only in the Build log.
To reproduce enbled the option in gcc-4.6

--- Code: ---cc1plus: error: unrecognized command line option ‘-std=c++11’

--- End code ---

Alpha:
Does the following work?

--- Code: ---m_RegExes.Add(RegExStruct(_("Compiler error (unrecognized option)"), cltError, _T(".*cc.*:[ \t]([Uu]nrecognized.*option.*)"), 1));

--- End code ---

xunxun:

--- Quote from: Alpha on June 23, 2012, 04:28:12 am ---Does the following work?

--- Code: ---m_RegExes.Add(RegExStruct(_("Compiler error (unrecognized option)"), cltError, _T(".*cc.*:[ \t]([Uu]nrecognized.*option.*)"), 1));

--- End code ---

--- End quote ---
Maybe remove cc is better? because it maybe exist in other compilers such as f951...

Alpha:
I think you are right.

--- Code: ---m_RegExes.Add(RegExStruct(_("Unrecognized option"), cltError, _T(".*:[ \t]([Uu]nrecognized.*option.*)"), 1));

--- End code ---
This will make the regex "Linker error (unrecognized option)" obsolete, so it should be removed.

(Sorry I cannot provide the patch currently; I can guarantee that if I created a diff from my local source, it would change a bit more than just one regex in the compiler... ;))

oBFusCATed:
Alpha: no one stops you from having two working copies :)
But I don't like this regexp, I think it is too generic.

Navigation

[0] Message Index

[#] Next page

Go to full version