]> gcc.gnu.org Git - gcc.git/commit
d: Don't include terminating null pointer in string expression conversion (PR102185)
authorIain Buclaw <ibuclaw@gdcproject.org>
Fri, 3 Sep 2021 07:34:00 +0000 (09:34 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 12 Sep 2021 15:46:53 +0000 (17:46 +0200)
commit09a2049123e242aaf8a4bbfa8eb3ce92901b6f4e
treedb9b9e865a8dbf6f8dd462b081f8ba03cd15b08e
parent2ae73531d3395dcb617b31948f3b30ff2fdaa5e8
d: Don't include terminating null pointer in string expression conversion (PR102185)

This gets re-added by the ExprVisitor when lowering StringExp back into a
STRING_CST during the code generator pass.

PR d/102185

gcc/d/ChangeLog:

* d-builtins.cc (d_eval_constant_expression): Don't include
terminating null pointer in string expression conversion.

gcc/testsuite/ChangeLog:

* gdc.dg/pr102185.d: New test.

(cherry picked from commit 53a4def0dc1aac39d592a0d20e9ec16e8b5574ac)
gcc/d/d-builtins.cc
gcc/testsuite/gdc.dg/pr102185.d [new file with mode: 0644]
This page took 0.064995 seconds and 6 git commands to generate.