public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-9896] analyzer, testuite: comment fixes
@ 2024-04-10 20:46 David Malcolm
0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2024-04-10 20:46 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:082374f6570a311b0ef95cdf712dbc6eb1e7cd17
commit r14-9896-g082374f6570a311b0ef95cdf712dbc6eb1e7cd17
Author: David Malcolm <dmalcolm@redhat.com>
Date: Wed Apr 10 16:43:27 2024 -0400
analyzer, testuite: comment fixes
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/memset-1.c: Clarify some comments.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diff:
---
gcc/testsuite/c-c++-common/analyzer/memset-1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/analyzer/memset-1.c b/gcc/testsuite/c-c++-common/analyzer/memset-1.c
index 75aef53d348..d6695d49411 100644
--- a/gcc/testsuite/c-c++-common/analyzer/memset-1.c
+++ b/gcc/testsuite/c-c++-common/analyzer/memset-1.c
@@ -58,7 +58,7 @@ void test_5 (int n)
__analyzer_eval (buf[42] == 'A'); /* { dg-warning "TRUE" } */
memset (buf, 0, n);
- /* We can't know if buf[42] was written to or not. */
+ /* We can't know if buf[42] was overwritten by the memset or not. */
__analyzer_eval (buf[42] == 'A'); /* { dg-warning "UNKNOWN" } */
__analyzer_eval (buf[42] == '\0'); /* { dg-warning "UNKNOWN" } */
}
@@ -72,7 +72,7 @@ void test_5a (int n)
__analyzer_eval (buf[42] == 'A'); /* { dg-warning "TRUE" } */
__builtin___memset_chk (buf, 0, n, __builtin_object_size (buf, 0));
- /* We can't know if buf[42] was written to or not. */
+ /* We can't know if buf[42] was overwritten by the memset or not. */
__analyzer_eval (buf[42] == 'A'); /* { dg-warning "UNKNOWN" } */
__analyzer_eval (buf[42] == '\0'); /* { dg-warning "UNKNOWN" } */
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-10 20:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10 20:46 [gcc r14-9896] analyzer, testuite: comment fixes David Malcolm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).