@@ -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 ,
@@ -125,21 +124,12 @@ def parse_output(self, output):
125
124
'severity' : match .group ('severity' ).lower (),
126
125
'file' : match .group ('file' ),
127
126
'line' : match .group ('line' ),
128
- 'col' : 0 ,
127
+ 'col' : match . group ( 'col' ) ,
129
128
'message' : match .group ('message' ),
130
129
'text' : '' ,
131
130
'target_name' : self .target .name ,
132
131
'toolchain_name' : self .name
133
132
}
134
- elif msg is not None :
135
- # Determine the warning/error column by calculating the ^ position
136
- match = self .INDEX_PATTERN .match (line )
137
- if match is not None :
138
- msg ['col' ] = len (match .group ('col' ))
139
- self .cc_info (msg )
140
- msg = None
141
- else :
142
- msg ['text' ] += line + "\n "
143
133
144
134
if msg is not None :
145
135
self .cc_info (msg )
0 commit comments