- Timestamp:
- Jul 29, 2020 9:52:10 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bldprogs/VBoxCompilerPlugInsGcc.cpp
r82968 r85502 49 49 #endif 50 50 #include "cp/cp-tree.h" 51 #if RT_GNUC_PREREQ(10, 0) 52 # include "stringpool.h" 53 # include "attribs.h" 54 #endif 51 55 #if __GNUC__ == 4 && __GNUC_MINOR__ == 5 52 56 } … … 153 157 154 158 #if RT_GNUC_PREREQ(4, 9) 159 155 160 /** My pass. */ 156 161 static const pass_data g_MyPassData = … … 158 163 type : GIMPLE_PASS, 159 164 name : "*iprt-format-checks", /* asterisk = no dump */ 165 # if RT_GNUC_PREREQ(10, 0) 166 optinfo_flags : OPTGROUP_NONE, 167 # else 160 168 optinfo_flags : 0, 169 # endif 161 170 tv_id : TV_NONE, 162 171 properties_required : 0, … … 195 204 type : GIMPLE_PASS, 196 205 name : "*iprt-format-checks", /* asterisk = no dump */ 197 # if __GNUC__ != 4 || __GNUC_MINOR__ != 5206 # if RT_GNUC_PREREQ(4, 6) 198 207 optinfo_flags : 0, 199 208 # endif … … 234 243 type_required : true, 235 244 function_type_required : true, 245 # if RT_GNUC_PREREQ(4, 6) 246 affects_type_identity : false, 247 #endif 236 248 handler : AttributeHandler, 237 # if __GNUC__ != 4 || __GNUC_MINOR__ != 5238 affects_type_identity : false239 # endif249 # if RT_GNUC_PREREQ(10, 0) 250 exclude : NULL, 251 # endif 240 252 }, 241 253 { … … 246 258 type_required : true, 247 259 function_type_required : true, 260 # if RT_GNUC_PREREQ(4, 6) 261 affects_type_identity : false, 262 #endif 248 263 handler : AttributeHandler, 249 # if __GNUC__ != 4 || __GNUC_MINOR__ != 5250 affects_type_identity : false251 # endif264 # if RT_GNUC_PREREQ(10, 0) 265 exclude : NULL, 266 # endif 252 267 } 253 268 }; … … 361 376 362 377 378 #if 0 379 DECLINLINE(int) MyGetLineLength(const char *pszLine) 380 { 381 if (pszLine) 382 { 383 const char *pszEol = strpbrk(pszLine, "\n\r"); 384 if (!pszEol) 385 pszEol = strchr(pszLine, '\0'); 386 return (int)(pszEol - pszLine); 387 } 388 return 0; 389 } 390 #endif 391 363 392 static location_t MyGetFormatStringLocation(PVFMTCHKSTATE pState, const char *pszLoc) 364 393 { … … 370 399 { 371 400 unsigned uCol = 1 + offString; 401 # if 0 /* apparently not needed */ 372 402 expanded_location XLoc = expand_location_to_spelling_point(hLoc); 403 # if RT_GNUC_PREREQ(10,0) 404 char_span Span = location_get_source_line(XLoc.file, XLoc.line); 405 const char *pszLine = Span.m_ptr; /** @todo if enabled */ 406 int cchLine = (int)Span.m_n_elts; 407 # elif RT_GNUC_PREREQ(6,0) 373 408 int cchLine = 0; 374 # if RT_GNUC_PREREQ(6,0)375 409 const char *pszLine = location_get_source_line(XLoc.file, XLoc.line, &cchLine); 376 410 # elif RT_GNUC_PREREQ(5,0) 411 int cchLine = 0; 377 412 const char *pszLine = location_get_source_line(XLoc, &cchLine); 378 413 # else 379 414 const char *pszLine = location_get_source_line(XLoc); 380 if (pszLine) 381 { 382 const char *pszEol = strpbrk(pszLine, "\n\r"); 383 if (!pszEol) 384 pszEol = strchr(pszLine, '\0'); 385 cchLine = (int)(pszEol - pszLine); 386 } 415 int cchLine = MyGetLineLength(pszLine); 387 416 # endif 388 417 if (pszLine) … … 392 421 cchLine -= XLoc.column - 1; 393 422 } 423 # endif 394 424 395 425 hLoc = MyGetLocationPlusColumnOffset(hLoc, uCol);
Note:
See TracChangeset
for help on using the changeset viewer.