aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppdefault.c
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2018-12-11 11:12:26 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-12-11 11:12:26 +0000
commitd71b0a9a041430612883f7f891bb25b8e21b6f2c (patch)
treec32b8439fc729f4c8dfb939fa06b43990cc92e88 /gcc/cppdefault.c
parentc13269965084ccb19233411164b52c7f187a5fb6 (diff)
downloadgcc-d71b0a9a041430612883f7f891bb25b8e21b6f2c.zip
gcc-d71b0a9a041430612883f7f891bb25b8e21b6f2c.tar.gz
gcc-d71b0a9a041430612883f7f891bb25b8e21b6f2c.tar.bz2
[Ada] Do not expand code inside ignored ghost bodies
While ignored ghost code is not compiled into the executable, it may lead to compilation errors when it makes use of language features requiring runtime support that is not available in the available runtime library. These errors are spurious, as the executable will never call in these runtime units. This patch deactivates the expansion of code inside ignored ghost bodies of subprograms and packages, so that this code is still checked for possible semantic errors, but it does not force the presence of useless runtime units. There is no impact on the executable produced. 2018-12-11 Yannick Moy <moy@adacore.com> gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Deactivate expansion in ignored ghost subprogram body. * sem_ch7.adb (Analyze_Package_Body_Helper): Deactivate expansion in ignored ghost package body. gcc/testsuite/ * gnat.dg/ghost4.adb: New testcase. From-SVN: r267015
Diffstat (limited to 'gcc/cppdefault.c')
0 files changed, 0 insertions, 0 deletions