aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-10-07 10:22:24 +0200
committerMartin Liska <mliska@suse.cz>2022-10-07 10:22:24 +0200
commite1d1842b5432472330384d1523bb3c3132c4fea0 (patch)
tree5aca250d577366471d12bf8d8501157d8c0876ee /gcc/cp
parentbd0e35188f2a40a428314ad10e10ab5b0926f935 (diff)
downloadgcc-e1d1842b5432472330384d1523bb3c3132c4fea0.zip
gcc-e1d1842b5432472330384d1523bb3c3132c4fea0.tar.gz
gcc-e1d1842b5432472330384d1523bb3c3132c4fea0.tar.bz2
fix clang warnings
Fixes: gcc/c-family/name-hint.h:109:66: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call] gcc/config/i386/i386-expand.cc:1351:9: warning: argument 'operands' of type 'rtx[3]' (aka 'rtx_def *[3]') with mismatched bound [-Warray-parameter] gcc/config/i386/i386.cc:15635:8: warning: argument 'operands' of type 'rtx[2]' (aka 'rtx_def *[2]') with mismatched bound [-Warray-parameter] gcc/cp/module.cc:17482:51: warning: argument 'counts' of type 'unsigned int[8]' with mismatched bound [-Warray-parameter] gcc/cp/module.cc:17508:37: warning: argument 'counts' of type 'unsigned int[8]' with mismatched bound [-Warray-parameter] gcc/cp/name-lookup.cc:6385:16: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call] gcc/c-family/ChangeLog: * name-hint.h: Use std::move. gcc/ChangeLog: * config/i386/i386-protos.h (ix86_binary_operator_ok): Add array size to function parameter. (ix86_unary_operator_ok): Likewise. gcc/cp/ChangeLog: * module.cc (enum module_state_counts): Use array size. * name-lookup.cc (class namespace_limit_reached): Likewise. (class module_state): Move up in the file.
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/module.cc32
-rw-r--r--gcc/cp/name-lookup.cc2
2 files changed, 17 insertions, 17 deletions
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index 500ac06..c5eff21 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -3469,6 +3469,20 @@ enum streamed_extensions {
SE_BITS = 1
};
+/* Counter indices. */
+enum module_state_counts
+{
+ MSC_sec_lwm,
+ MSC_sec_hwm,
+ MSC_pendings,
+ MSC_entities,
+ MSC_namespaces,
+ MSC_bindings,
+ MSC_macros,
+ MSC_inits,
+ MSC_HWM
+};
+
/********************************************************************/
struct module_state_config;
@@ -3666,8 +3680,8 @@ class GTY((chain_next ("%h.parent"), for_user)) module_state {
private:
void write_config (elf_out *to, struct module_state_config &, unsigned crc);
bool read_config (struct module_state_config &);
- static void write_counts (elf_out *to, unsigned [], unsigned *crc_ptr);
- bool read_counts (unsigned []);
+ static void write_counts (elf_out *to, unsigned [MSC_HWM], unsigned *crc_ptr);
+ bool read_counts (unsigned *);
public:
void note_cmi_name ();
@@ -14541,20 +14555,6 @@ module_state::read_partitions (unsigned count)
return true;
}
-/* Counter indices. */
-enum module_state_counts
-{
- MSC_sec_lwm,
- MSC_sec_hwm,
- MSC_pendings,
- MSC_entities,
- MSC_namespaces,
- MSC_bindings,
- MSC_macros,
- MSC_inits,
- MSC_HWM
-};
-
/* Data for config reading and writing. */
struct module_state_config {
const char *dialect_str;
diff --git a/gcc/cp/name-lookup.cc b/gcc/cp/name-lookup.cc
index d6757d1..25657cf 100644
--- a/gcc/cp/name-lookup.cc
+++ b/gcc/cp/name-lookup.cc
@@ -6382,7 +6382,7 @@ class namespace_limit_reached : public deferred_diagnostic
std::unique_ptr<deferred_diagnostic> wrapped)
: deferred_diagnostic (loc),
m_limit (limit), m_name (name),
- m_wrapped (move (wrapped))
+ m_wrapped (std::move (wrapped))
{
}