]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
analyzer, testuite: comment fixes
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 10 Apr 2024 20:43:27 +0000 (16:43 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 10 Apr 2024 20:43:27 +0000 (16:43 -0400)
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/memset-1.c: Clarify some comments.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/testsuite/c-c++-common/analyzer/memset-1.c

index 75aef53d3487401fdc47f5e37dfd4bbafe194f14..d6695d494111c92452ce3ddae4a263c5153f8a4b 100644 (file)
@@ -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" } */
 }