GCC Bugzilla has been upgraded from version 4.4.9 to 5.0rc3. If you see any problem, please report it to bug 64968.
View | Details | Raw Unified | Return to bug 36478
Collapse All | Expand All

(-)a/libcpp/macro.c (-1 / +16 lines)
Lines 1228-1234 cpp_get_token (cpp_reader *pfile) Link Here
1228
	  /* If not in a macro context, and we're going to start an
1228
	  /* If not in a macro context, and we're going to start an
1229
	     expansion, record the location.  */
1229
	     expansion, record the location.  */
1230
	  if (can_set && !context->macro)
1230
	  if (can_set && !context->macro)
1231
	    pfile->invocation_location = result->src_loc;
1231
	    {
1232
	      /* We are going to record the location of the end
1233
	         of the macro token, rather than it's beginning.  */
1234
	      int start_of_token_col =
1235
		SOURCE_COLUMN (linemap_lookup (pfile->line_table,
1236
					       result->src_loc),
1237
			       result->src_loc);
1238
	      int end_of_token_col =
1239
		      start_of_token_col
1240
			+ strlen ((char*) cpp_token_as_text
1241
						(pfile, result)) - 1;
1242
1243
	      LINEMAP_POSITION_FOR_COLUMN (pfile->invocation_location,
1244
					   pfile->line_table,
1245
					   end_of_token_col);
1246
	    }
1232
	  if (pfile->state.prevent_expansion)
1247
	  if (pfile->state.prevent_expansion)
1233
	    break;
1248
	    break;
1234
	  ret = enter_macro_context (pfile, node, result);
1249
	  ret = enter_macro_context (pfile, node, result);

Return to bug 36478