Skip to content

Commit

Permalink
c-family: Use -Wdiscarded-qualifiers for ignored qualifiers in __atom…
Browse files Browse the repository at this point in the history
…ic_*

This matches other compiler diagnostics.  No test updates are needed
because c-c++-common/pr95378.c does not match a specific -W option.

Fixes commit d2384b7 ("c-family:
check qualifiers of arguments to __atomic built-ins (PR 95378)").

gcc/c-family/

	PR c/113050
	* c-common.cc (get_atomic_generic_size): Use
	OPT_Wdiscarded_qualifiers instead of
	OPT_Wincompatible_pointer_types.
  • Loading branch information
fweimer-rh authored and ouuleilei-bot committed Dec 17, 2023
1 parent c2d62cd commit 49ed620
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gcc/c-family/c-common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7471,7 +7471,7 @@ get_atomic_generic_size (location_t loc, tree function,
return 0;
}
else
pedwarn (loc, OPT_Wincompatible_pointer_types, "argument %d "
pedwarn (loc, OPT_Wdiscarded_qualifiers, "argument %d "
"of %qE discards %<const%> qualifier", x + 1,
function);
}
Expand All @@ -7485,7 +7485,7 @@ get_atomic_generic_size (location_t loc, tree function,
return 0;
}
else
pedwarn (loc, OPT_Wincompatible_pointer_types, "argument %d "
pedwarn (loc, OPT_Wdiscarded_qualifiers, "argument %d "
"of %qE discards %<volatile%> qualifier", x + 1,
function);
}
Expand Down

0 comments on commit 49ed620

Please sign in to comment.