vec.h (vNULL): Extend comment to say = vNULL initialization isn't needed for static...
authorJakub Jelinek <jakub@redhat.com>
Fri, 23 Sep 2016 16:59:14 +0000 (18:59 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 23 Sep 2016 16:59:14 +0000 (18:59 +0200)
* vec.h (vNULL): Extend comment to say = vNULL initialization
isn't needed for static vars.

From-SVN: r240445

gcc/ChangeLog
gcc/vec.h

index e32b062ad5aab6009586563f96608410424c8f1c..9e6acc7484692bb17a52f4a8add6c48159c98ad3 100644 (file)
@@ -1,5 +1,8 @@
 2016-09-23  Jakub Jelinek  <jakub@redhat.com>
 
+       * vec.h (vNULL): Extend comment to say = vNULL initialization
+       isn't needed for static vars.
+
        * sel-sched-ir.c (sel_global_bb_info, sel_region_bb_info,
        loop_nests, s_i_d, last_added_blocks): Remove unnecessary
        = vNULL initialization of file scope vec.
index 959871bcc1ed5676ef5c32405b8b9a656c587da5..14fb2a673c139f1f48fee17585e2c4be1ffdcfb4 100644 (file)
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -410,7 +410,9 @@ struct GTY((user)) vec
 /* Type to provide NULL values for vec<T, A, L>.  This is used to
    provide nil initializers for vec instances.  Since vec must be
    a POD, we cannot have proper ctor/dtor for it.  To initialize
-   a vec instance, you can assign it the value vNULL.  */
+   a vec instance, you can assign it the value vNULL.  This isn't
+   needed for file-scope and function-local static vectors, which
+   are zero-initialized by default.  */
 struct vnull
 {
   template <typename T, typename A, typename L>