Mercury Bugs - mercury
View Issue Details
0000393mercuryBugpublic2015-09-15 10:402015-09-18 06:57
Reporterwangp 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000393: #line directives in .mh cause unnecessary recompilations
DescriptionThis is a source of mysterious recompilations that I was experiencing in debug grades. I had a mutable declaration near the *end* of a file:

:- mutable(debug_num, int, 0, ground, [untrailed, attach_to_io_state]).

resulting in a #line directive in the .mh file:

#ifndef WRITEPDF__RASTER_DECL_GUARD
#define WRITEPDF__RASTER_DECL_GUARD
#line 1400 "../writepdf/raster.m"
#ifdef MR_HIGHLEVEL_CODE
    extern MR_Integer writepdf__raster__mutable_variable_debug_num;
#else
    extern MR_Word writepdf__raster__mutable_variable_debug_num;
#endif
#ifdef MR_THREAD_SAFE
    extern MercuryLock writepdf__raster__mutable_variable_debug_num_lock;
#endif

Adding or removing blank lines would be enough to triggering recompilation of seemingly unrelated .c files.
TagsNo tags attached.
Attached Files

Notes
(0000848)
zs   
2015-09-18 06:57   
Fixed 18 sep 2015 by commit 410c75c81f47d0a1f5620f1f41f4e7afe87c665d.

Issue History
2015-09-15 10:40wangpNew Issue
2015-09-17 16:19zsAssigned To => zs
2015-09-17 16:19zsStatusnew => assigned
2015-09-18 06:57zsNote Added: 0000848
2015-09-18 06:57zsStatusassigned => resolved
2015-09-18 06:57zsResolutionopen => fixed