aboutsummaryrefslogtreecommitdiff
path: root/gcc/d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d')
-rw-r--r--gcc/d/ChangeLog15
-rw-r--r--gcc/d/Make-lang.in2
-rw-r--r--gcc/d/d-attribs.cc9
-rw-r--r--gcc/d/d-codegen.cc6
4 files changed, 22 insertions, 10 deletions
diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog
index 4fe6418..ab6042b 100644
--- a/gcc/d/ChangeLog
+++ b/gcc/d/ChangeLog
@@ -1,3 +1,18 @@
+2025-08-18 Indu Bhagat <indu.bhagat@oracle.com>
+
+ * d-attribs.cc (d_handle_no_sanitize_attribute): Use
+ 'sanitize_code_type' instead of 'unsigned int'.
+
+2025-08-11 Iain Sandoe <iain@sandoe.co.uk>
+
+ * d-codegen.cc (build_filename_from_loc): Use
+ build_string_literal() to build a null-terminated string for
+ the filename.
+
+2025-08-06 Sam James <sam@gentoo.org>
+
+ * Make-lang.in (ALL_DFLAGS): Don't use ALIASING_FLAGS.
+
2025-07-25 David Malcolm <dmalcolm@redhat.com>
* d-diagnostic.cc: Likewise.
diff --git a/gcc/d/Make-lang.in b/gcc/d/Make-lang.in
index 2d444c9..0ddd524 100644
--- a/gcc/d/Make-lang.in
+++ b/gcc/d/Make-lang.in
@@ -61,7 +61,7 @@ WARN_DFLAGS = -Wall -Wdeprecated
NOEXCEPTION_DFLAGS = $(filter-out -fno-rtti, $(NOEXCEPTION_FLAGS))
ALL_DFLAGS = $(DFLAGS-$@) $(GDCFLAGS) -fversion=IN_GCC $(CHECKING_DFLAGS) \
- $(PICFLAG) $(ALIASING_FLAGS) $(NOEXCEPTION_DFLAGS) $(COVERAGE_FLAGS) \
+ $(PICFLAG) $(NOEXCEPTION_DFLAGS) $(COVERAGE_FLAGS) \
$(WARN_DFLAGS)
DCOMPILE.base = $(GDC) -c $(ALL_DFLAGS) -o $@
diff --git a/gcc/d/d-attribs.cc b/gcc/d/d-attribs.cc
index 77315dc..53aea5e 100644
--- a/gcc/d/d-attribs.cc
+++ b/gcc/d/d-attribs.cc
@@ -1406,7 +1406,7 @@ d_handle_no_sanitize_attribute (tree *node, tree name, tree args, int,
return NULL_TREE;
}
- unsigned int flags = 0;
+ sanitize_code_type flags = 0;
for (; args; args = TREE_CHAIN (args))
{
tree id = TREE_VALUE (args);
@@ -1424,16 +1424,17 @@ d_handle_no_sanitize_attribute (tree *node, tree name, tree args, int,
merge existing flags if no_sanitize was previously handled. */
if (tree attr = lookup_attribute ("no_sanitize", DECL_ATTRIBUTES (*node)))
{
- unsigned int old_value = tree_to_uhwi (TREE_VALUE (attr));
+ sanitize_code_type old_value =
+ tree_to_sanitize_code_type (TREE_VALUE (attr));
flags |= old_value;
if (flags != old_value)
- TREE_VALUE (attr) = build_int_cst (d_uint_type, flags);
+ TREE_VALUE (attr) = build_int_cst (d_ulong_type, flags);
}
else
{
DECL_ATTRIBUTES (*node) = tree_cons (get_identifier ("no_sanitize"),
- build_int_cst (d_uint_type, flags),
+ build_int_cst (d_ulong_type, flags),
DECL_ATTRIBUTES (*node));
}
diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc
index e35f75a..f3c3e4a 100644
--- a/gcc/d/d-codegen.cc
+++ b/gcc/d/d-codegen.cc
@@ -1939,11 +1939,7 @@ build_filename_from_loc (const Loc &loc)
if (filename == NULL)
filename = d_function_chain->module->srcfile.toChars ();
- unsigned length = strlen (filename);
- tree str = build_string (length, filename);
- TREE_TYPE (str) = make_array_type (Type::tchar, length + 1);
-
- return build_address (str);
+ return build_string_literal (filename);
}
/* Builds a CALL_EXPR at location LOC in the source file to call LIBCALL when