MPS issue job003681

TitleMPS does not compile with -Wunreachable-code
Statusclosed
Prioritynice
Assigned userGareth Rees
OrganizationRavenbrook
DescriptionThe MPS cannot be compiled with any project that uses the -Wunreachable-code option to Clang.
AnalysisThere are four places where unreachable code is reported:

1. protCatchThread in protxc.c
2. vmArenaExtend in areavm.c
3,4. Two uses of STATISTIC_BEGIN in poolamc.c and trace.c

See [1] for more analysis.
How foundmanual_test
Evidence[1] <https://info.ravenbrook.com/mail/2014/02/24/21-34-45/0/>
Created byGareth Rees
Created on2014-02-24 21:31:20
Last modified byGareth Rees
Last modified on2014-03-30 14:26:03
History2014-02-24 GDR Created.

Fixes

Change Effect Date User Description
185089 closed 2014-03-30 14:26:02 Gareth Rees Turn on -Wunreachable-code for GCC and Clang.
Remove unreachable code:
* No need to have different debug options or structured allocation classes for different platforms.
* Don't use STATISTIC_BEGIN, use STATISTIC_STAT.
* #ifdef away the unused code in zmess.c for testing ControlAlloc failure.
* Remove unused code from the example Scheme interpreter.
184482 open 2014-02-24 21:32:22 Gareth Rees Refactor the computation of the chunk size into its own function, thus avoiding an "unreachable code" error from Clang.
184478 open 2014-02-24 18:07:14 Gareth Rees Avoid use of unreachable code in protCatchThread on OS X.