Page MenuHomeFeedback Tracker

#include after block comment invalidates line references
New, NormalPublic

Description

Currently, there is an odd bug in the preprocessor which will cause that the line references get useless.

This makes debugging problems hard when working with the preprocessor and requires fixing.

Issue:

  • Line reference is not where it should be when using #include "" after

Expected:

  • Line reference should be as in the original file

Reasoning for Major:
Depending on the actual scriptfile, this can deadly hurt when using block comment headers.
Unexperienced scripters might not even be able to debug their code at all as they cannot understand why the code shown in the error at line XY is simply not at that line

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Scripting
Steps To Reproduce
  1. setup a missino/addon
  2. Add one of the non-working example codes into there
  3. Check the error line position (will be off depending on the blockcomment)
Additional Information
#include "script_component.hpp"
/*
 * test
 */
error;

comment is line 1
include is line 2
error is line 3

/*
 * test
 */
#include "script_component.hpp"
error;

include is line 1
comment is line 2-4
error is line 5

Event Timeline

X39 created this task.Mar 9 2017, 7:28 PM
This comment was removed by dedmen.
dedmen added a subscriber: dedmen.Mar 31 2020, 2:05 PM
dedmen claimed this task.May 27 2020, 10:35 AM
This comment was removed by Dwarden.
This comment was removed by Servis_shoes.
This comment was removed by Dwarden.
Dwarden added a subscriber: Dwarden.Apr 8 2023, 4:33 PM
This comment was removed by Geez.
Geez added a subscriber: Geez.Sep 27 2023, 11:06 AM