Issue 23902 - ImportC error message location for #defines are not precise enough.
Summary: ImportC error message location for #defines are not precise enough.
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Mac OS X
: P1 enhancement
Assignee: No Owner
URL:
Keywords: ImportC
Depends on:
Blocks:
 
Reported: 2023-05-07 21:56 UTC by mhh
Modified: 2023-05-10 02:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description mhh 2023-05-07 21:56:34 UTC
`#defines(num)` may be given as a location. This is confusing and also extremely unhelpful when anything goes wrong.

The solution is simple: Pack a flag into the Loc struct dmd uses, then store the contextual information about the #define properly.