@@ -26,8 +26,7 @@ class GCC(mbedToolchain):
26
26
LIBRARY_EXT = '.a'
27
27
28
28
STD_LIB_NAME = "lib%s.a"
29
- DIAGNOSTIC_PATTERN = re .compile ('((?P<file>[^:]+):(?P<line>\d+):)(\d+:)? (?P<severity>warning|[eE]rror|fatal error): (?P<message>.+)' )
30
- INDEX_PATTERN = re .compile ('(?P<col>\s*)\^' )
29
+ DIAGNOSTIC_PATTERN = re .compile ('((?P<file>[^:]+):(?P<line>\d+):)(?P<col>\d+):? (?P<severity>warning|[eE]rror|fatal error): (?P<message>.+)' )
31
30
32
31
def __init__ (self , target , notify = None , macros = None ,
33
32
silent = False , extra_verbose = False , build_profile = None ,
@@ -128,21 +127,12 @@ def parse_output(self, output):
128
127
'severity' : match .group ('severity' ).lower (),
129
128
'file' : match .group ('file' ),
130
129
'line' : match .group ('line' ),
131
- 'col' : 0 ,
130
+ 'col' : match . group ( 'col' ) ,
132
131
'message' : match .group ('message' ),
133
132
'text' : '' ,
134
133
'target_name' : self .target .name ,
135
134
'toolchain_name' : self .name
136
135
}
137
- elif msg is not None :
138
- # Determine the warning/error column by calculating the ^ position
139
- match = self .INDEX_PATTERN .match (line )
140
- if match is not None :
141
- msg ['col' ] = len (match .group ('col' ))
142
- self .cc_info (msg )
143
- msg = None
144
- else :
145
- msg ['text' ] += line + "\n "
146
136
147
137
if msg is not None :
148
138
self .cc_info (msg )
0 commit comments