aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.cc
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2024-12-03 17:49:15 -0500
committerMarc Poulhiès <dkm@gcc.gnu.org>2025-01-03 16:39:11 +0100
commit2c1200d671759d7d138a15b3f891d88cc5fc48da (patch)
tree87266c11f7e4855f6efa2a7219d9673d0c50dfc6 /gcc/fortran/trans-expr.cc
parent05f211ab748c478196ece74948efa14f05f78dcb (diff)
downloadgcc-2c1200d671759d7d138a15b3f891d88cc5fc48da.zip
gcc-2c1200d671759d7d138a15b3f891d88cc5fc48da.tar.gz
gcc-2c1200d671759d7d138a15b3f891d88cc5fc48da.tar.bz2
ada: Warn on unmodified parameters of expression functions
If an 'out' or 'in out' parameter is not modified in a function body, we warn. However, the warning was missing when we have an expression function instead of a proper body. This patch enables the warning on expression functions. gcc/ada/ChangeLog: * sem_ch6.adb (Analyze_Expression_Function): Mark the implicit spec for an expression function as Comes_From_Source. (Analyze_Null_Procedure): Minor cleanup. * sem_warn.adb (Source_E1): New function to compute whether to give warnings. In particular, return True for [in] out parameters of expression functions.
Diffstat (limited to 'gcc/fortran/trans-expr.cc')
0 files changed, 0 insertions, 0 deletions