2024-11-14 14:53 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000280mercuryBugpublic2015-07-07 15:23
Reporterjuliensf 
Assigned Tojuliensf 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000280: Parser stack overflow with MSVC
DescriptionAttempting to compile compiler/options.c (from the rote-2012-04-10 srcdist) with MSVC
results in:

    fatal error C1026: parser stack overflow, program too complex

It looks as though the C code we generate for the predicate long_option/2 is too
heavily nested; I'll try to separate it out a bit and see if that avoids the limitation.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000505

juliensf (administrator)

Actually, the problem may be that the source distribution is built with --no-smart-indexing.
(The other approaches for string switches shouldn't bump into these sort of limitations.)

~0000506

juliensf (administrator)

It's fine if you rebuild the .c files with --smart-indexing. In the long term, I would like to be able
to compile the MSVC version of Mercury directly from the source distribution. Some options here are:

(1) Work out whether --smart-indexing is still causing problems with the source distribution.

(2) Manually, break long_options/2 into smaller chunks.

(3) If compiling with --no-smart-indexing then change the MLDS code generator so that
it breaks deeply nested if-then-else chains into separate C functions -- i.e. get the code generator
to do (2).

~0000837

juliensf (administrator)

The source distribution C files are now built with --smart-indexing enabled (option 1 above).
+Notes

-Issue History
Date Modified Username Field Change
2013-04-11 14:06 juliensf New Issue
2013-04-11 14:06 juliensf Status new => assigned
2013-04-11 14:06 juliensf Assigned To => juliensf
2013-04-11 14:09 juliensf Note Added: 0000505
2013-04-11 16:34 juliensf Note Added: 0000506
2015-07-07 15:23 juliensf Note Added: 0000837
2015-07-07 15:23 juliensf Status assigned => resolved
2015-07-07 15:23 juliensf Resolution open => fixed
+Issue History