@@ -813,19 +813,19 @@ changes to one object won't affect the others, the object's initializer will run
813
813
once per copy, etc.
814
814
815
815
Specifically, this warning fires when it detects an object which:
816
- 1. Is defined as ``inline`` in a header file (so it might get compiled into multiple libaries), and
817
- 2. Has external linkage (otherwise it's supposed to be duplicated), and
818
- 3. Has hidden visibility.
816
+ 1. Is defined as ``inline`` in a header file (so it might get compiled into multiple libaries), and
817
+ 2. Has external linkage (otherwise it's supposed to be duplicated), and
818
+ 3. Has hidden visibility.
819
819
820
820
As well as one of the following:
821
- 1. The object is mutable, or
822
- 2. The object's initializer definitely has side effects.
821
+ 1. The object is mutable, or
822
+ 2. The object's initializer definitely has side effects.
823
823
824
824
The warning can be resolved by removing one of the conditions above. In rough
825
825
order of preference, this may be done by:
826
- 1. Marking the object ``const`` (if possible)
827
- 2. Moving the object's definition to a source file
828
- 3. Giving the object non-hidden visibility, e.g. using ``__attribute((visibility("default")))``.
826
+ 1. Marking the object ``const`` (if possible)
827
+ 2. Moving the object's definition to a source file
828
+ 3. Giving the object non-hidden visibility, e.g. using ``__attribute((visibility("default")))``.
829
829
830
830
Note that for (2), all levels of a pointer variable must be constant;
831
831
``const int*`` will trigger the warning because the pointer itself is mutable.
0 commit comments