blob: e2b0bd7dd5507b08f0f7dbc9114c8af11f8f7f22 [file] [log] [blame]
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001..
2 -------------------------------------------------------------------
3 NOTE: This file is automatically generated by running clang-tblgen
4 -gen-diag-docs. Do not edit this file by hand!!
5 -------------------------------------------------------------------
6
7.. Add custom CSS to output. FIXME: This should be put into <head> rather
8 than the start of <body>.
9.. raw:: html
10
11 <style>
12 table.docutils {
13 width: 1px;
14 }
15 table.docutils td {
16 border: none;
Richard Smith14568ff2016-09-14 02:24:50 +000017 padding: 0 0 0 0.2em;
Richard Smithb6a3b4b2016-09-12 05:58:29 +000018 vertical-align: middle;
19 white-space: nowrap;
20 width: 1px;
Richard Smith14568ff2016-09-14 02:24:50 +000021 font-family: monospace;
Richard Smithb6a3b4b2016-09-12 05:58:29 +000022 }
23 table.docutils tr + tr {
24 border-top: 0.2em solid #aaa;
25 }
26 .error {
27 font-family: monospace;
28 font-weight: bold;
Richard Smithac205312016-09-12 17:55:49 +000029 color: #c00;
Richard Smithb6a3b4b2016-09-12 05:58:29 +000030 }
31 .warning {
32 font-family: monospace;
33 font-weight: bold;
Richard Smith9d5f86b2016-09-14 00:35:56 +000034 color: #80a;
Richard Smithb6a3b4b2016-09-12 05:58:29 +000035 }
36 .remark {
37 font-family: monospace;
38 font-weight: bold;
39 color: #00c;
40 }
41 .diagtext {
42 font-family: monospace;
43 font-weight: bold;
44 }
45 </style>
46
Richard Smith14568ff2016-09-14 02:24:50 +000047.. FIXME: rST doesn't support formatting this, so we format all <td> elements
48 as monospace font face instead.
Richard Smithb6a3b4b2016-09-12 05:58:29 +000049.. |nbsp| unicode:: 0xA0
50 :trim:
51
52.. Roles generated by clang-tblgen.
53.. role:: error
54.. role:: warning
55.. role:: remark
56.. role:: diagtext
57.. role:: placeholder(emphasis)
58
59=========================
60Diagnostic flags in Clang
61=========================
62.. contents::
63 :local:
64
65Introduction
66============
67
68This page lists the diagnostic flags currently supported by Clang.
69
70Diagnostic flags
71================
72
73-W
74--
75Synonym for `-Wextra`_.
76
77
78-W#pragma-messages
79------------------
80This diagnostic is enabled by default.
81
82**Diagnostic text:**
83
84The text of this diagnostic is not controlled by Clang.
85
86
87-W#warnings
88-----------
89This diagnostic is enabled by default.
90
91**Diagnostic text:**
92
93The text of this diagnostic is not controlled by Clang.
94
95
96-WCFString-literal
97------------------
98This diagnostic is enabled by default.
99
100**Diagnostic text:**
101
102+------------------------------------------------------------------------------------------------------------------------------------+
103|:warning:`warning:` |nbsp| :diagtext:`input conversion stopped due to an input byte that does not belong to the input codeset UTF-8`|
104+------------------------------------------------------------------------------------------------------------------------------------+
105
106
107-WCL4
108-----
109Some of the diagnostics controlled by this flag are enabled by default.
110
111Controls `-Wall`_, `-Wextra`_.
112
113
114-WIndependentClass-attribute
115----------------------------
116This diagnostic is enabled by default.
117
118**Diagnostic text:**
119
120+------------------------------------------------------------------------------------------------------------------------------+
121|:warning:`warning:` |nbsp| :diagtext:`'objc\_independent\_class' attribute may be put on a typedef only; attribute is ignored`|
122+------------------------------------------------------------------------------------------------------------------------------+
123
124+----------------------------------------------------------------------------------------------------------------------------------------------------+
125|:warning:`warning:` |nbsp| :diagtext:`'objc\_independent\_class' attribute may be put on Objective-C object pointer type only; attribute is ignored`|
126+----------------------------------------------------------------------------------------------------------------------------------------------------+
127
128
129-WNSObject-attribute
130--------------------
131This diagnostic is enabled by default.
132
133**Diagnostic text:**
134
135+--------------------------------------------------------------------------------------------------------------+
136|:warning:`warning:` |nbsp| :diagtext:`'NSObject' attribute may be put on a typedef only; attribute is ignored`|
137+--------------------------------------------------------------------------------------------------------------+
138
139
140-Wabi
141-----
142This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
143
144-Wabsolute-value
145----------------
146This diagnostic is enabled by default.
147
148**Diagnostic text:**
149
150+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
151|:warning:`warning:` |nbsp| :diagtext:`absolute value function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`given an argument of type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`but has parameter of type` |nbsp| :placeholder:`C` |nbsp| :diagtext:`which may cause truncation of value`|
152+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
153
154+---------------------------------------------------------------------------+----------------------+---------------------------------------------------------------------------------+
155|:warning:`warning:` |nbsp| :diagtext:`taking the absolute value of` |nbsp| |+--------------------+| |nbsp| :diagtext:`type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`is suspicious`|
156| ||:diagtext:`pointer` || |
157| |+--------------------+| |
158| ||:diagtext:`function`|| |
159| |+--------------------+| |
160| ||:diagtext:`array` || |
161| |+--------------------+| |
162+---------------------------------------------------------------------------+----------------------+---------------------------------------------------------------------------------+
163
164+------------------------------------------------------------------------------------------------------------------------------------------+
165|:warning:`warning:` |nbsp| :diagtext:`taking the absolute value of unsigned type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has no effect`|
166+------------------------------------------------------------------------------------------------------------------------------------------+
167
168+----------------------------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------------+----------------------------+------------------------+
169|:warning:`warning:` |nbsp| :diagtext:`using` |nbsp| |+--------------------------+| |nbsp| :diagtext:`absolute value function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`when argument is of` |nbsp| |+--------------------------+| |nbsp| :diagtext:`type`|
170| ||:diagtext:`integer` || ||:diagtext:`integer` || |
171| |+--------------------------+| |+--------------------------+| |
172| ||:diagtext:`floating point`|| ||:diagtext:`floating point`|| |
173| |+--------------------------+| |+--------------------------+| |
174| ||:diagtext:`complex` || ||:diagtext:`complex` || |
175| |+--------------------------+| |+--------------------------+| |
176+----------------------------------------------------+----------------------------+------------------------------------------------------------------------------------------------------------------+----------------------------+------------------------+
177
178
179-Wabstract-final-class
180----------------------
181This diagnostic is enabled by default.
182
183**Diagnostic text:**
184
185+-----------------------------------------------------------------+--------------------+-------------+
186|:warning:`warning:` |nbsp| :diagtext:`abstract class is marked '`|+------------------+|:diagtext:`'`|
187| ||:diagtext:`final` || |
188| |+------------------+| |
189| ||:diagtext:`sealed`|| |
190| |+------------------+| |
191+-----------------------------------------------------------------+--------------------+-------------+
192
193
194-Wabstract-vbase-init
195---------------------
196**Diagnostic text:**
197
198+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
199|:warning:`warning:` |nbsp| :diagtext:`initializer for virtual base class` |nbsp| :placeholder:`A` |nbsp| :diagtext:`of abstract class` |nbsp| :placeholder:`B` |nbsp| :diagtext:`will never be used`|
200+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
201
202
203-Waddress
204---------
205This diagnostic is enabled by default.
206
207Controls `-Wpointer-bool-conversion`_, `-Wstring-compare`_, `-Wtautological-pointer-compare`_.
208
209
210-Waddress-of-array-temporary
211----------------------------
212This diagnostic is enabled by default.
213
214**Diagnostic text:**
215
216+---------------------------------------------------------------------------------------------------------------------------------------------+
217|:warning:`warning:` |nbsp| :diagtext:`pointer is initialized by a temporary array, which will be destroyed at the end of the full-expression`|
218+---------------------------------------------------------------------------------------------------------------------------------------------+
219
220
221-Waddress-of-packed-member
222--------------------------
223This diagnostic is enabled by default.
224
225**Diagnostic text:**
226
227+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
228|:warning:`warning:` |nbsp| :diagtext:`taking address of packed member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`of class or structure` |nbsp| :placeholder:`B` |nbsp| :diagtext:`may result in an unaligned pointer value`|
229+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
230
231
232-Waddress-of-temporary
233----------------------
234This diagnostic is an error by default, but the flag ``-Wno-address-of-temporary`` can be used to disable the error.
235
236**Diagnostic text:**
237
238+-----------------------------------------------------------------------------------------------------------+
239|:error:`error:` |nbsp| :diagtext:`taking the address of a temporary object of type` |nbsp| :placeholder:`A`|
240+-----------------------------------------------------------------------------------------------------------+
241
242
243-Waggregate-return
244------------------
245This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
246
Richard Smith66310362017-10-26 21:06:52 +0000247-Waligned-allocation-unavailable
248--------------------------------
249This diagnostic is an error by default, but the flag ``-Wno-aligned-allocation-unavailable`` can be used to disable the error.
250
251**Diagnostic text:**
252
253+--------------------------------------------------+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
254|:error:`error:` |nbsp| :diagtext:`aligned` |nbsp| |+------------------------+| |nbsp| :diagtext:`function of type '`:placeholder:`B`:diagtext:`' is only available on` |nbsp| :placeholder:`C` |nbsp| :placeholder:`D` |nbsp| :diagtext:`or newer`|
255| ||:diagtext:`allocation` || |
256| |+------------------------+| |
257| ||:diagtext:`deallocation`|| |
258| |+------------------------+| |
259+--------------------------------------------------+--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
260
261
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000262-Wall
263-----
264Some of the diagnostics controlled by this flag are enabled by default.
265
266Controls `-Wmost`_, `-Wparentheses`_, `-Wswitch`_, `-Wswitch-bool`_.
267
268
Richard Smithcf9f4222017-01-20 19:27:09 +0000269-Walloca-with-align-alignof
270---------------------------
271This diagnostic is enabled by default.
272
273**Diagnostic text:**
274
275+--------------------------------------------------------------------------------------------------------------------+
276|:warning:`warning:` |nbsp| :diagtext:`second argument to \_\_builtin\_alloca\_with\_align is supposed to be in bits`|
277+--------------------------------------------------------------------------------------------------------------------+
278
279
280-Wambiguous-delete
281------------------
282This diagnostic is enabled by default.
283
284**Diagnostic text:**
285
286+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
287|:warning:`warning:` |nbsp| :diagtext:`multiple suitable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`functions for` |nbsp| :placeholder:`B`:diagtext:`; no 'operator delete' function will be invoked if initialization throws an exception`|
288+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
289
290
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000291-Wambiguous-ellipsis
292--------------------
293This diagnostic is enabled by default.
294
295**Diagnostic text:**
296
297+------------------------------------------------------------------------------------------------+---------------------------------------------+
298|:warning:`warning:` |nbsp| :diagtext:`'...' in this location creates a C-style varargs function`|+-------------------------------------------+|
299| ||:diagtext:`, not a function parameter pack`||
300| |+-------------------------------------------+|
301| || ||
302| |+-------------------------------------------+|
303+------------------------------------------------------------------------------------------------+---------------------------------------------+
304
305
306-Wambiguous-macro
307-----------------
308This diagnostic is enabled by default.
309
310**Diagnostic text:**
311
312+-------------------------------------------------------------------------------------------+
313|:warning:`warning:` |nbsp| :diagtext:`ambiguous expansion of macro` |nbsp| :placeholder:`A`|
314+-------------------------------------------------------------------------------------------+
315
316
317-Wambiguous-member-template
318---------------------------
319This diagnostic is enabled by default.
320
321**Diagnostic text:**
322
323+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
324|:warning:`warning:` |nbsp| :diagtext:`lookup of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in member access expression is ambiguous; using member of` |nbsp| :placeholder:`B`|
325+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
326
327
328-Wanalyzer-incompatible-plugin
329------------------------------
330This diagnostic is enabled by default.
331
332**Diagnostic text:**
333
334+----------------------------------------------------------------------------------------------------------------------------------------+
335|:warning:`warning:` |nbsp| :diagtext:`checker plugin '`:placeholder:`A`:diagtext:`' is not compatible with this version of the analyzer`|
336+----------------------------------------------------------------------------------------------------------------------------------------+
337
338
339-Wanonymous-pack-parens
340-----------------------
341This diagnostic is enabled by default.
342
343**Diagnostic text:**
344
345+---------------------------------------------------------------------------------------------------------+
346|:warning:`warning:` |nbsp| :diagtext:`ISO C++11 requires a parenthesized pack declaration to have a name`|
347+---------------------------------------------------------------------------------------------------------+
348
349
350-Warc
351-----
352This diagnostic is enabled by default.
353
Richard Smith8cba2912016-09-14 01:55:42 +0000354Controls `-Warc-non-pod-memaccess`_, `-Warc-retain-cycles`_, `-Warc-unsafe-retained-assign`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000355
356
357-Warc-bridge-casts-disallowed-in-nonarc
358---------------------------------------
359This diagnostic is enabled by default.
360
361**Diagnostic text:**
362
363+-------------------------------------------------------------------------------------------------------------+
364|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' casts have no effect when not using ARC`|
365+-------------------------------------------------------------------------------------------------------------+
366
367
368-Warc-maybe-repeated-use-of-weak
369--------------------------------
370**Diagnostic text:**
371
372+---------------------------------------------------+-------------------------------+------------------------------------------------------------------------------------------+----------------------+-------------------------------------------------------------------------------------------------------------+
373|:warning:`warning:` |nbsp| :diagtext:`weak` |nbsp| |+-----------------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`may be accessed multiple times in this` |nbsp| |+--------------------+| |nbsp| :diagtext:`and may be unpredictably set to nil; assign to a strong variable to keep the object alive`|
374| ||:diagtext:`variable` || ||:diagtext:`function`|| |
375| |+-----------------------------+| |+--------------------+| |
376| ||:diagtext:`property` || ||:diagtext:`method` || |
377| |+-----------------------------+| |+--------------------+| |
378| ||:diagtext:`implicit property`|| ||:diagtext:`block` || |
379| |+-----------------------------+| |+--------------------+| |
380| ||:diagtext:`instance variable`|| ||:diagtext:`lambda` || |
381| |+-----------------------------+| |+--------------------+| |
382+---------------------------------------------------+-------------------------------+------------------------------------------------------------------------------------------+----------------------+-------------------------------------------------------------------------------------------------------------+
383
384
385-Warc-non-pod-memaccess
386-----------------------
387This diagnostic is enabled by default.
388
389**Diagnostic text:**
390
391+---------------------------+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
392|:warning:`warning:` |nbsp| |+---------------------------+| |nbsp| :diagtext:`this` |nbsp| :placeholder:`B` |nbsp| :diagtext:`call is a pointer to ownership-qualified type` |nbsp| :placeholder:`C`|
393| ||:diagtext:`destination for`|| |
394| |+---------------------------+| |
395| ||:diagtext:`source of` || |
396| |+---------------------------+| |
397+---------------------------+-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
398
399
400-Warc-performSelector-leaks
401---------------------------
402This diagnostic is enabled by default.
403
404**Diagnostic text:**
405
406+-------------------------------------------------------------------------------------------------------+
407|:warning:`warning:` |nbsp| :diagtext:`performSelector may cause a leak because its selector is unknown`|
408+-------------------------------------------------------------------------------------------------------+
409
410
411-Warc-repeated-use-of-weak
412--------------------------
413Also controls `-Warc-maybe-repeated-use-of-weak`_.
414
415**Diagnostic text:**
416
417+---------------------------------------------------+-------------------------------+--------------------------------------------------------------------------------------+----------------------+-------------------------------------------------------------------------------------------------------------+
418|:warning:`warning:` |nbsp| :diagtext:`weak` |nbsp| |+-----------------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`is accessed multiple times in this` |nbsp| |+--------------------+| |nbsp| :diagtext:`but may be unpredictably set to nil; assign to a strong variable to keep the object alive`|
419| ||:diagtext:`variable` || ||:diagtext:`function`|| |
420| |+-----------------------------+| |+--------------------+| |
421| ||:diagtext:`property` || ||:diagtext:`method` || |
422| |+-----------------------------+| |+--------------------+| |
423| ||:diagtext:`implicit property`|| ||:diagtext:`block` || |
424| |+-----------------------------+| |+--------------------+| |
425| ||:diagtext:`instance variable`|| ||:diagtext:`lambda` || |
426| |+-----------------------------+| |+--------------------+| |
427+---------------------------------------------------+-------------------------------+--------------------------------------------------------------------------------------+----------------------+-------------------------------------------------------------------------------------------------------------+
428
429
430-Warc-retain-cycles
431-------------------
432This diagnostic is enabled by default.
433
434**Diagnostic text:**
435
436+------------------------------------------------------------------------------------------------------------------------------------------------------+
437|:warning:`warning:` |nbsp| :diagtext:`capturing` |nbsp| :placeholder:`A` |nbsp| :diagtext:`strongly in this block is likely to lead to a retain cycle`|
438+------------------------------------------------------------------------------------------------------------------------------------------------------+
439
440
441-Warc-unsafe-retained-assign
442----------------------------
443This diagnostic is enabled by default.
444
445**Diagnostic text:**
446
447+--------------------------------------------------------+---------------------------------+-------------------------------------+----------------------+------------------------------------------------------+
448|:warning:`warning:` |nbsp| :diagtext:`assigning` |nbsp| |+-------------------------------+| |nbsp| :diagtext:`to a weak` |nbsp| |+--------------------+|:diagtext:`; object will be released after assignment`|
449| ||:diagtext:`array literal` || ||:diagtext:`property`|| |
450| |+-------------------------------+| |+--------------------+| |
451| ||:diagtext:`dictionary literal` || ||:diagtext:`variable`|| |
452| |+-------------------------------+| |+--------------------+| |
453| ||:diagtext:`numeric literal` || | | |
454| |+-------------------------------+| | | |
455| ||:diagtext:`boxed expression` || | | |
456| |+-------------------------------+| | | |
457| ||:diagtext:`<should not happen>`|| | | |
458| |+-------------------------------+| | | |
459| ||:diagtext:`block literal` || | | |
460| |+-------------------------------+| | | |
461+--------------------------------------------------------+---------------------------------+-------------------------------------+----------------------+------------------------------------------------------+
462
463+---------------------------------------------------------------------------+--------------------------------+--------+----------------------+------------------------------------------------------+
464|:warning:`warning:` |nbsp| :diagtext:`assigning retained object to` |nbsp| |+------------------------------+| |nbsp| |+--------------------+|:diagtext:`; object will be released after assignment`|
465| ||:diagtext:`weak` || ||:diagtext:`property`|| |
466| |+------------------------------+| |+--------------------+| |
467| ||:diagtext:`unsafe\_unretained`|| ||:diagtext:`variable`|| |
468| |+------------------------------+| |+--------------------+| |
469+---------------------------------------------------------------------------+--------------------------------+--------+----------------------+------------------------------------------------------+
470
471+-----------------------------------------------------------------------------------------------------------------------------+
472|:warning:`warning:` |nbsp| :diagtext:`assigning retained object to unsafe property; object will be released after assignment`|
473+-----------------------------------------------------------------------------------------------------------------------------+
474
475
476-Warray-bounds
477--------------
478This diagnostic is enabled by default.
479
480**Diagnostic text:**
481
482+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+-------------+
483|:warning:`warning:` |nbsp| :diagtext:`array index` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is past the end of the array (which contains` |nbsp| :placeholder:`B` |nbsp| :diagtext:`element`|+-------------+|:diagtext:`)`|
484| || || |
485| |+-------------+| |
486| ||:diagtext:`s`|| |
487| |+-------------+| |
488+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+-------------+
489
490+----------------------------------------------------------------------------------------------------------------------------------+
491|:warning:`warning:` |nbsp| :diagtext:`array index` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is before the beginning of the array`|
492+----------------------------------------------------------------------------------------------------------------------------------+
493
494+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
495|:warning:`warning:` |nbsp| :diagtext:`array argument is too small; contains` |nbsp| :placeholder:`A` |nbsp| :diagtext:`elements, callee requires at least` |nbsp| :placeholder:`B`|
496+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
497
498+-----------------------------------------------------------------------------------+
499|:warning:`warning:` |nbsp| :diagtext:`'static' has no effect on zero-length arrays`|
500+-----------------------------------------------------------------------------------+
501
502
503-Warray-bounds-pointer-arithmetic
504---------------------------------
505**Diagnostic text:**
506
507+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+-------------+
508|:warning:`warning:` |nbsp| :diagtext:`the pointer incremented by` |nbsp| :placeholder:`A` |nbsp| :diagtext:`refers past the end of the array (that contains` |nbsp| :placeholder:`B` |nbsp| :diagtext:`element`|+-------------+|:diagtext:`)`|
509| || || |
510| |+-------------+| |
511| ||:diagtext:`s`|| |
512| |+-------------+| |
513+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+-------------+
514
515+-----------------------------------------------------------------------------------------------------------------------------------------------------+
516|:warning:`warning:` |nbsp| :diagtext:`the pointer decremented by` |nbsp| :placeholder:`A` |nbsp| :diagtext:`refers before the beginning of the array`|
517+-----------------------------------------------------------------------------------------------------------------------------------------------------+
518
519
520-Wasm
521-----
Richard Smithcf9f4222017-01-20 19:27:09 +0000522This diagnostic is enabled by default.
523
524Controls `-Wasm-ignored-qualifier`_, `-Wasm-operand-widths`_.
525
526
527-Wasm-ignored-qualifier
528-----------------------
529This diagnostic is enabled by default.
530
531**Diagnostic text:**
532
533+----------------------------------------------------------------------------------------------------------+
534|:warning:`warning:` |nbsp| :diagtext:`ignored` |nbsp| :placeholder:`A` |nbsp| :diagtext:`qualifier on asm`|
535+----------------------------------------------------------------------------------------------------------+
536
537+-------------------------------------------------------------------------------------+
538|:warning:`warning:` |nbsp| :diagtext:`meaningless 'volatile' on asm outside function`|
539+-------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000540
541
542-Wasm-operand-widths
543--------------------
544This diagnostic is enabled by default.
545
546**Diagnostic text:**
547
548+-----------------------------------------------------------------------------------------------------------------------+
549|:warning:`warning:` |nbsp| :diagtext:`value size does not match register size specified by the constraint and modifier`|
550+-----------------------------------------------------------------------------------------------------------------------+
551
552
553-Wassign-enum
554-------------
555**Diagnostic text:**
556
557+---------------------------------------------------------------------------------------------------------------+
558|:warning:`warning:` |nbsp| :diagtext:`integer constant not in range of enumerated type` |nbsp| :placeholder:`A`|
559+---------------------------------------------------------------------------------------------------------------+
560
561
562-Wassume
563--------
564This diagnostic is enabled by default.
565
566**Diagnostic text:**
567
568+-----------------------------------------------------------------------------------------------------------------------------------------+
569|:warning:`warning:` |nbsp| :diagtext:`the argument to` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has side effects that will be discarded`|
570+-----------------------------------------------------------------------------------------------------------------------------------------+
571
572
573-Wat-protocol
574-------------
575This diagnostic is enabled by default.
576
577**Diagnostic text:**
578
579+-------------------------------------------------------------------------------------------------------------------+
580|:warning:`warning:` |nbsp| :diagtext:`@protocol is using a forward protocol declaration of` |nbsp| :placeholder:`A`|
581+-------------------------------------------------------------------------------------------------------------------+
582
583
584-Watomic-memory-ordering
585------------------------
586This diagnostic is enabled by default.
587
588**Diagnostic text:**
589
590+-------------------------------------------------------------------------------------------+
591|:warning:`warning:` |nbsp| :diagtext:`memory order argument to atomic operation is invalid`|
592+-------------------------------------------------------------------------------------------+
593
594
595-Watomic-properties
596-------------------
Richard Smith8cba2912016-09-14 01:55:42 +0000597Controls `-Wcustom-atomic-properties`_, `-Wimplicit-atomic-properties`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000598
599
600-Watomic-property-with-user-defined-accessor
601--------------------------------------------
602This diagnostic is enabled by default.
603
604**Diagnostic text:**
605
606+--------------------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------------+--------------------+
607|:warning:`warning:` |nbsp| :diagtext:`writable atomic property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`cannot pair a synthesized` |nbsp| |+------------------+| |nbsp| :diagtext:`with a user defined` |nbsp| |+------------------+|
608| ||:diagtext:`getter`|| ||:diagtext:`getter`||
609| |+------------------+| |+------------------+|
610| ||:diagtext:`setter`|| ||:diagtext:`setter`||
611| |+------------------+| |+------------------+|
612+--------------------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------------+--------------------+
613
614
615-Wattribute-packed-for-bitfield
616-------------------------------
617This diagnostic is enabled by default.
618
619**Diagnostic text:**
620
621+-------------------------------------------------------------------------------------------------------------------------------------------------+
622|:warning:`warning:` |nbsp| :diagtext:`'packed' attribute was ignored on bit-fields with single-byte alignment in older versions of GCC and Clang`|
623+-------------------------------------------------------------------------------------------------------------------------------------------------+
624
625
626-Wattributes
627------------
628This diagnostic is enabled by default.
629
Richard Smith8cba2912016-09-14 01:55:42 +0000630Controls `-Wignored-attributes`_, `-Wunknown-attributes`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000631
632
633-Wauto-disable-vptr-sanitizer
634-----------------------------
635This diagnostic is enabled by default.
636
637**Diagnostic text:**
638
639+------------------------------------------------------------------------------------------------------+
640|:warning:`warning:` |nbsp| :diagtext:`implicitly disabling vptr sanitizer because rtti wasn't enabled`|
641+------------------------------------------------------------------------------------------------------+
642
643
644-Wauto-import
645-------------
646**Diagnostic text:**
647
648+-------------------------------------------------+---------------------------------+-------------------------------------------------------------------------+
649|:warning:`warning:` |nbsp| :diagtext:`treating #`|+-------------------------------+| |nbsp| :diagtext:`as an import of module '`:placeholder:`B`:diagtext:`'`|
650| ||:diagtext:`include` || |
651| |+-------------------------------+| |
652| ||:diagtext:`import` || |
653| |+-------------------------------+| |
654| ||:diagtext:`include\_next` || |
655| |+-------------------------------+| |
656| ||:diagtext:`\_\_include\_macros`|| |
657| |+-------------------------------+| |
658+-------------------------------------------------+---------------------------------+-------------------------------------------------------------------------+
659
660
661-Wauto-storage-class
662--------------------
663This diagnostic is enabled by default.
664
665**Diagnostic text:**
666
667+---------------------------------------------------------------------------------------------------------------------------------------------+
668|:warning:`warning:` |nbsp| :diagtext:`'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases`|
669+---------------------------------------------------------------------------------------------------------------------------------------------+
670
671
672-Wauto-var-id
673-------------
674This diagnostic is enabled by default.
675
676**Diagnostic text:**
677
678+-------------------------------------------------------------------------------------------------------+
679|:warning:`warning:` |nbsp| :diagtext:`'auto' deduced as 'id' in declaration of` |nbsp| :placeholder:`A`|
680+-------------------------------------------------------------------------------------------------------+
681
682
683-Wavailability
684--------------
685This diagnostic is enabled by default.
686
687**Diagnostic text:**
688
689+--------------------------------------------------------------------------------------------------------------+
690|:warning:`warning:` |nbsp| :diagtext:`'unavailable' availability overrides all other availability information`|
691+--------------------------------------------------------------------------------------------------------------+
692
693+------------------------------------------------------------------------------------------------------------------------+
694|:warning:`warning:` |nbsp| :diagtext:`unknown platform` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in availability macro`|
695+------------------------------------------------------------------------------------------------------------------------+
696
697+----------------------------------------------------------------+------------------------+------------------------------------------------------------------------------------------------------------------------------------------+------------------------+-------------------------------------------------------------------------------------+
698|:warning:`warning:` |nbsp| :diagtext:`feature cannot be` |nbsp| |+----------------------+| |nbsp| :diagtext:`in` |nbsp| :placeholder:`B` |nbsp| :diagtext:`version` |nbsp| :placeholder:`C` |nbsp| :diagtext:`before it was` |nbsp| |+----------------------+| |nbsp| :diagtext:`in version` |nbsp| :placeholder:`E`:diagtext:`; attribute ignored`|
699| ||:diagtext:`introduced`|| ||:diagtext:`introduced`|| |
700| |+----------------------+| |+----------------------+| |
701| ||:diagtext:`deprecated`|| ||:diagtext:`deprecated`|| |
702| |+----------------------+| |+----------------------+| |
703| ||:diagtext:`obsoleted` || ||:diagtext:`obsoleted` || |
704| |+----------------------+| |+----------------------+| |
705+----------------------------------------------------------------+------------------------+------------------------------------------------------------------------------------------------------------------------------------------+------------------------+-------------------------------------------------------------------------------------+
706
707+---------------------------------------------------------------------------------------------------------------------------+
708|:warning:`warning:` |nbsp| :diagtext:`use same version number separators '\_' or '.'; as in 'major\[.minor\[.subminor\]\]'`|
709+---------------------------------------------------------------------------------------------------------------------------+
710
711+---------------------------------------------------------------------------------------+
712|:warning:`warning:` |nbsp| :diagtext:`availability does not match previous declaration`|
713+---------------------------------------------------------------------------------------+
714
715+---------------------------+--------------------------------+--------------------------+-------------------------------+--------+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
716|:warning:`warning:` |nbsp| |+------------------------------+|:diagtext:`method` |nbsp| |+-----------------------------+| |nbsp| |+---------------------------------------------+| |nbsp| :diagtext:`on` |nbsp| :placeholder:`B` |nbsp| :diagtext:`(`:placeholder:`C` |nbsp| :diagtext:`vs.` |nbsp| :placeholder:`D`:diagtext:`)`|
717| || || ||:diagtext:`introduced after` || ||:diagtext:`the protocol method it implements`|| |
718| |+------------------------------+| |+-----------------------------+| |+---------------------------------------------+| |
719| ||:diagtext:`overriding` |nbsp| || ||:diagtext:`deprecated before`|| ||:diagtext:`overridden method` || |
720| |+------------------------------+| |+-----------------------------+| |+---------------------------------------------+| |
721| | | ||:diagtext:`obsoleted before` || | | |
722| | | |+-----------------------------+| | | |
723+---------------------------+--------------------------------+--------------------------+-------------------------------+--------+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
724
725+---------------------------+--------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------+--------------------------------+
726|:warning:`warning:` |nbsp| |+------------------------------+|:diagtext:`method cannot be unavailable on` |nbsp| :placeholder:`A` |nbsp| :diagtext:`when` |nbsp| |+---------------------------------------------+| |nbsp| :diagtext:`is available`|
727| || || ||:diagtext:`the protocol method it implements`|| |
728| |+------------------------------+| |+---------------------------------------------+| |
729| ||:diagtext:`overriding` |nbsp| || ||:diagtext:`its overridden method` || |
730| |+------------------------------+| |+---------------------------------------------+| |
731+---------------------------+--------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------+--------------------------------+
732
733
734-Wbackend-plugin
735----------------
736This diagnostic is enabled by default.
737
738**Diagnostic text:**
739
740The text of this diagnostic is not controlled by Clang.
741
742
743-Wbackslash-newline-escape
744--------------------------
745This diagnostic is enabled by default.
746
747**Diagnostic text:**
748
749+-------------------------------------------------------------------------------+
750|:warning:`warning:` |nbsp| :diagtext:`backslash and newline separated by space`|
751+-------------------------------------------------------------------------------+
752
753
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000754-Wbad-function-cast
755-------------------
756**Diagnostic text:**
757
758+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
759|:warning:`warning:` |nbsp| :diagtext:`cast from function call of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to non-matching type` |nbsp| :placeholder:`B`|
760+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
761
762
Richard Smith66310362017-10-26 21:06:52 +0000763-Wbinary-literal
764----------------
765Controls `-Wc++14-binary-literal`_, `-Wc++98-c++11-compat-binary-literal`_, `-Wgnu-binary-literal`_.
766
767
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000768-Wbind-to-temporary-copy
769------------------------
770Also controls `-Wc++98-compat-bind-to-temporary-copy`_.
771
772**Diagnostic text:**
773
774+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------+
775|:warning:`warning:` |nbsp| :diagtext:`C++98 requires an accessible copy constructor for class` |nbsp| :placeholder:`C` |nbsp| :diagtext:`when binding a reference to a temporary; was` |nbsp| |+---------------------+|
776| ||:diagtext:`private` ||
777| |+---------------------+|
778| ||:diagtext:`protected`||
779| |+---------------------+|
780+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------+
781
782+--------------------------------------------------------------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
783|:warning:`warning:` |nbsp| :diagtext:`no viable constructor` |nbsp| |+---------------------------------------+| |nbsp| :diagtext:`of type` |nbsp| :placeholder:`B`:diagtext:`; C++98 requires a copy constructor when binding a reference to a temporary`|
784| ||:diagtext:`copying variable` || |
785| |+---------------------------------------+| |
786| ||:diagtext:`copying parameter` || |
787| |+---------------------------------------+| |
788| ||:diagtext:`returning object` || |
789| |+---------------------------------------+| |
790| ||:diagtext:`throwing object` || |
791| |+---------------------------------------+| |
792| ||:diagtext:`copying member subobject` || |
793| |+---------------------------------------+| |
794| ||:diagtext:`copying array element` || |
795| |+---------------------------------------+| |
796| ||:diagtext:`allocating object` || |
797| |+---------------------------------------+| |
798| ||:diagtext:`copying temporary` || |
799| |+---------------------------------------+| |
800| ||:diagtext:`initializing base subobject`|| |
801| |+---------------------------------------+| |
802| ||:diagtext:`initializing vector element`|| |
803| |+---------------------------------------+| |
804| ||:diagtext:`capturing value` || |
805| |+---------------------------------------+| |
806+--------------------------------------------------------------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
807
808
809-Wbitfield-constant-conversion
810------------------------------
811This diagnostic is enabled by default.
812
813**Diagnostic text:**
814
Richard Smithcf9f4222017-01-20 19:27:09 +0000815+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
816|:warning:`warning:` |nbsp| :diagtext:`implicit truncation from` |nbsp| :placeholder:`C` |nbsp| :diagtext:`to bit-field changes value from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
817+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000818
819
Richard Smith9a016602017-04-13 22:44:22 +0000820-Wbitfield-enum-conversion
821--------------------------
822**Diagnostic text:**
823
824+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
825|:warning:`warning:` |nbsp| :diagtext:`bit-field` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not wide enough to store all enumerators of` |nbsp| :placeholder:`B`|
826+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
827
828+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
829|:warning:`warning:` |nbsp| :diagtext:`signed bit-field` |nbsp| :placeholder:`A` |nbsp| :diagtext:`needs an extra bit to represent the largest positive enumerators of` |nbsp| :placeholder:`B`|
830+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
831
832+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
833|:warning:`warning:` |nbsp| :diagtext:`assigning value of signed enum type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`to unsigned bit-field` |nbsp| :placeholder:`A`:diagtext:`; negative enumerators of enum` |nbsp| :placeholder:`B` |nbsp| :diagtext:`will be converted to positive values`|
834+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
835
836
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000837-Wbitfield-width
838----------------
839This diagnostic is enabled by default.
840
841**Diagnostic text:**
842
843+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+
844|:warning:`warning:` |nbsp| :diagtext:`width of anonymous bit-field (`:placeholder:`A` |nbsp| :diagtext:`bits) exceeds width of its type; value will be truncated to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`bit`|+-------------+|
845| || ||
846| |+-------------+|
847| ||:diagtext:`s`||
848| |+-------------+|
849+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+
850
851+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+
852|:warning:`warning:` |nbsp| :diagtext:`width of bit-field` |nbsp| :placeholder:`A` |nbsp| :diagtext:`(`:placeholder:`B` |nbsp| :diagtext:`bits) exceeds the width of its type; value will be truncated to` |nbsp| :placeholder:`C` |nbsp| :diagtext:`bit`|+-------------+|
853| || ||
854| |+-------------+|
855| ||:diagtext:`s`||
856| |+-------------+|
857+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------+
858
859
860-Wbitwise-op-parentheses
861------------------------
862This diagnostic is enabled by default.
863
864**Diagnostic text:**
865
866+-----------------------------------------------------------------------------------------------------------+
867|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' within '`:placeholder:`B`:diagtext:`'`|
868+-----------------------------------------------------------------------------------------------------------+
869
870
Richard Smithcf9f4222017-01-20 19:27:09 +0000871-Wblock-capture-autoreleasing
872-----------------------------
Richard Smith9a016602017-04-13 22:44:22 +0000873This diagnostic is enabled by default.
874
Richard Smithcf9f4222017-01-20 19:27:09 +0000875**Diagnostic text:**
876
877+-----------------------------------------------------------------------------------------------------------------------------+
878|:warning:`warning:` |nbsp| :diagtext:`block captures an autoreleasing out-parameter, which may result in use-after-free bugs`|
879+-----------------------------------------------------------------------------------------------------------------------------+
880
881
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000882-Wbool-conversion
883-----------------
884This diagnostic is enabled by default.
885
886Also controls `-Wpointer-bool-conversion`_, `-Wundefined-bool-conversion`_.
887
888**Diagnostic text:**
889
890+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
891|:warning:`warning:` |nbsp| :diagtext:`initialization of pointer of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to null from a constant boolean expression`|
892+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
893
894
895-Wbool-conversions
896------------------
897Synonym for `-Wbool-conversion`_.
898
899
900-Wbraced-scalar-init
901--------------------
902This diagnostic is enabled by default.
903
904**Diagnostic text:**
905
906+-----------------------------------------------------------------------+
907|:warning:`warning:` |nbsp| :diagtext:`braces around scalar initializer`|
908+-----------------------------------------------------------------------+
909
910
911-Wbridge-cast
912-------------
913This diagnostic is enabled by default.
914
915**Diagnostic text:**
916
917+------------------------------------------------------------------------------------------------------------------------------------------+
918|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`bridges to` |nbsp| :placeholder:`B`:diagtext:`, not` |nbsp| :placeholder:`C`|
919+------------------------------------------------------------------------------------------------------------------------------------------+
920
921+-------------------------------------------------------------------------------------------------------+
922|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`cannot bridge to` |nbsp| :placeholder:`B`|
923+-------------------------------------------------------------------------------------------------------+
924
925
926-Wbuiltin-macro-redefined
927-------------------------
928This diagnostic is enabled by default.
929
930**Diagnostic text:**
931
932+---------------------------------------------------------------+
933|:warning:`warning:` |nbsp| :diagtext:`redefining builtin macro`|
934+---------------------------------------------------------------+
935
936+---------------------------------------------------------------+
937|:warning:`warning:` |nbsp| :diagtext:`undefining builtin macro`|
938+---------------------------------------------------------------+
939
940
941-Wbuiltin-memcpy-chk-size
942-------------------------
943This diagnostic is enabled by default.
944
945**Diagnostic text:**
946
947+------------------------------------------------------------------------------------------------------+
948|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`will always overflow destination buffer`|
949+------------------------------------------------------------------------------------------------------+
950
951
952-Wbuiltin-requires-header
953-------------------------
954This diagnostic is enabled by default.
955
956**Diagnostic text:**
957
958+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
959|:warning:`warning:` |nbsp| :diagtext:`declaration of built-in function '`:placeholder:`B`:diagtext:`' requires inclusion of the header <`:placeholder:`A`:diagtext:`>`|
960+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
961
962
963-Wc++-compat
964------------
965**Diagnostic text:**
966
967+---------------------------+---------------------------+--------------------+--------------------------------------------+---------------------------+--------------------------+
968|:warning:`warning:` |nbsp| |+-------------------------+|+------------------+| |nbsp| :diagtext:`has size 0 in C,` |nbsp| |+-------------------------+| |nbsp| :diagtext:`in C++`|
969| || |||:diagtext:`struct`|| ||:diagtext:`size 1` || |
970| |+-------------------------+|+------------------+| |+-------------------------+| |
971| ||:diagtext:`empty` |nbsp| |||:diagtext:`union` || ||:diagtext:`non-zero size`|| |
972| |+-------------------------+|+------------------+| |+-------------------------+| |
973+---------------------------+---------------------------+--------------------+--------------------------------------------+---------------------------+--------------------------+
974
975
976-Wc++0x-compat
977--------------
978Synonym for `-Wc++11-compat`_.
979
980
981-Wc++0x-extensions
982------------------
983Synonym for `-Wc++11-extensions`_.
984
985
986-Wc++0x-narrowing
987-----------------
988Synonym for `-Wc++11-narrowing`_.
989
990
991-Wc++11-compat
992--------------
993Some of the diagnostics controlled by this flag are enabled by default.
994
Richard Smith66310362017-10-26 21:06:52 +0000995Also controls `-Wc++11-compat-deprecated-writable-strings`_, `-Wc++11-compat-reserved-user-defined-literal`_, `-Wc++11-narrowing`_, `-Wc++98-c++11-c++14-c++17-compat`_, `-Wc++98-c++11-c++14-compat`_, `-Wc++98-c++11-compat`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +0000996
997**Diagnostic text:**
998
999+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+------------------------------------+
1000|:warning:`warning:` |nbsp| :diagtext:`integer literal is too large to be represented in type 'long' and is subject to undefined behavior under C++98, interpreting as 'unsigned long'; this literal will` |nbsp| |+---------------------------------+| |nbsp| :diagtext:`in C++11 onwards`|
1001| ||:diagtext:`have type 'long long'`|| |
1002| |+---------------------------------+| |
1003| ||:diagtext:`be ill-formed` || |
1004| |+---------------------------------+| |
1005+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+------------------------------------+
1006
1007+--------------------------------------------------------------------------------------------------------------+
1008|:warning:`warning:` |nbsp| :diagtext:`'auto' storage class specifier is redundant and incompatible with C++11`|
1009+--------------------------------------------------------------------------------------------------------------+
1010
1011+-------------------------------------------------------------------------------------------------------------------------+
1012|:warning:`warning:` |nbsp| :diagtext:`identifier after literal will be treated as a user-defined literal suffix in C++11`|
1013+-------------------------------------------------------------------------------------------------------------------------+
1014
1015+-------------------------------------------------------------------------------------------+
1016|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' is a keyword in C++11`|
1017+-------------------------------------------------------------------------------------------+
1018
1019+--------------------------------------------------------------------------------------------------------------------------------+
1020|:warning:`warning:` |nbsp| :diagtext:`use of right-shift operator ('>>') in template argument will require parentheses in C++11`|
1021+--------------------------------------------------------------------------------------------------------------------------------+
1022
1023+--------------------------------------------------------------------------------+
1024|:warning:`warning:` |nbsp| :diagtext:`explicit instantiation cannot be 'inline'`|
1025+--------------------------------------------------------------------------------+
1026
1027+--------------------------------------------------------------------------------------------------------------------------------------+
1028|:warning:`warning:` |nbsp| :diagtext:`explicit instantiation of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`must occur at global scope`|
1029+--------------------------------------------------------------------------------------------------------------------------------------+
1030
1031+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
1032|:warning:`warning:` |nbsp| :diagtext:`explicit instantiation of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`not in a namespace enclosing` |nbsp| :placeholder:`B`|
1033+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
1034
1035+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
1036|:warning:`warning:` |nbsp| :diagtext:`explicit instantiation of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`must occur in namespace` |nbsp| :placeholder:`B`|
1037+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
1038
1039+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+------------------------------------+
1040|:warning:`warning:` |nbsp| :diagtext:`integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C++98; this literal will` |nbsp| |+---------------------------------+| |nbsp| :diagtext:`in C++11 onwards`|
1041| ||:diagtext:`have type 'long long'`|| |
1042| |+---------------------------------+| |
1043| ||:diagtext:`be ill-formed` || |
1044| |+---------------------------------+| |
1045+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+------------------------------------+
1046
1047
1048-Wc++11-compat-deprecated-writable-strings
1049------------------------------------------
1050This diagnostic is enabled by default.
1051
1052**Diagnostic text:**
1053
1054+---------------------------------------------------------------------------------------------------------------------------------+
1055|:warning:`warning:` |nbsp| :diagtext:`conversion from string literal to` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is deprecated`|
1056+---------------------------------------------------------------------------------------------------------------------------------+
1057
1058
1059-Wc++11-compat-pedantic
1060-----------------------
Richard Smith66310362017-10-26 21:06:52 +00001061Some of the diagnostics controlled by this flag are enabled by default.
1062
1063Controls `-Wc++11-compat`_, `-Wc++98-c++11-c++14-c++17-compat-pedantic`_, `-Wc++98-c++11-c++14-compat-pedantic`_, `-Wc++98-c++11-compat-pedantic`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001064
1065
1066-Wc++11-compat-reserved-user-defined-literal
1067--------------------------------------------
1068**Diagnostic text:**
1069
1070+----------------------------------------------------------------------------------------------------------------------------------+
1071|:warning:`warning:` |nbsp| :diagtext:`identifier after literal will be treated as a reserved user-defined literal suffix in C++11`|
1072+----------------------------------------------------------------------------------------------------------------------------------+
1073
1074
1075-Wc++11-extensions
1076------------------
1077Some of the diagnostics controlled by this flag are enabled by default.
1078
1079Also controls `-Wc++11-extra-semi`_, `-Wc++11-inline-namespace`_, `-Wc++11-long-long`_.
1080
1081**Diagnostic text:**
1082
1083+-------------------------------------------------------------------------------+
1084|:warning:`warning:` |nbsp| :diagtext:`alias declarations are a C++11 extension`|
1085+-------------------------------------------------------------------------------+
1086
1087+---------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------------------------------------------------+
1088|:warning:`warning:` |nbsp| :diagtext:`implicit conversion from array size expression of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| |+-----------------------+| |nbsp| :diagtext:`type` |nbsp| :placeholder:`C` |nbsp| :diagtext:`is a C++11 extension`|
1089| ||:diagtext:`integral` || |
1090| |+-----------------------+| |
1091| ||:diagtext:`enumeration`|| |
1092| |+-----------------------+| |
1093+---------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------------------------------------------------+
1094
1095+---------------------------------------------------------------------------------+
1096|:warning:`warning:` |nbsp| :diagtext:`'auto' type specifier is a C++11 extension`|
1097+---------------------------------------------------------------------------------+
1098
1099+-----------------------------------------------------------------------------------------------------------+
1100|:warning:`warning:` |nbsp| :diagtext:`enumeration types with a fixed underlying type are a C++11 extension`|
1101+-----------------------------------------------------------------------------------------------------------+
1102
1103+---------------------------+-----------------------+--------------------------------------------------------------+
1104|:warning:`warning:` |nbsp| |+---------------------+| |nbsp| :diagtext:`function definitions are a C++11 extension`|
1105| ||:diagtext:`defaulted`|| |
1106| |+---------------------+| |
1107| ||:diagtext:`deleted` || |
1108| |+---------------------+| |
1109+---------------------------+-----------------------+--------------------------------------------------------------+
1110
1111+-----------------------------------------------------------------------------------------------------------------------------------+
1112|:warning:`warning:` |nbsp| :diagtext:`befriending enumeration type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a C++11 extension`|
1113+-----------------------------------------------------------------------------------------------------------------------------------+
1114
1115+--------------------------------------------------------------------------------------------------+
1116|:warning:`warning:` |nbsp| :diagtext:`commas at the end of enumerator lists are a C++11 extension`|
1117+--------------------------------------------------------------------------------------------------+
1118
1119+------------------------------------------------------------------------------------------+
1120|:warning:`warning:` |nbsp| :diagtext:`explicit conversion functions are a C++11 extension`|
1121+------------------------------------------------------------------------------------------+
1122
1123+-----------------------------------------------------------------------------+
1124|:warning:`warning:` |nbsp| :diagtext:`extern templates are a C++11 extension`|
1125+-----------------------------------------------------------------------------+
1126
1127+--------------------------------------------------------------------------------+
1128|:warning:`warning:` |nbsp| :diagtext:`range-based for loop is a C++11 extension`|
1129+--------------------------------------------------------------------------------+
1130
1131+------------------------------------------------------------------------------------------+
1132|:warning:`warning:` |nbsp| :diagtext:`generalized initializer lists are a C++11 extension`|
1133+------------------------------------------------------------------------------------------+
1134
1135+---------------------------------------------------------------------------------------------------------+
1136|:warning:`warning:` |nbsp| :diagtext:`use of enumeration in a nested name specifier is a C++11 extension`|
1137+---------------------------------------------------------------------------------------------------------+
1138
1139+----------------------------------------------------------------------------------------------------------------------------+
1140|:warning:`warning:` |nbsp| :diagtext:`non-class friend type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a C++11 extension`|
1141+----------------------------------------------------------------------------------------------------------------------------+
1142
1143+-------------------------------------------------------------------------------------------------------------+
1144|:warning:`warning:` |nbsp| :diagtext:`in-class initialization of non-static data member is a C++11 extension`|
1145+-------------------------------------------------------------------------------------------------------------+
1146
1147+--------------------------------------------------------------------------------------------------+
1148|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' keyword is a C++11 extension`|
1149+--------------------------------------------------------------------------------------------------+
1150
1151+----------------------------------------------------------------------------------------------+
1152|:warning:`warning:` |nbsp| :diagtext:`reference qualifiers on functions are a C++11 extension`|
1153+----------------------------------------------------------------------------------------------+
1154
1155+------------------------------------------------------------------------------+
1156|:warning:`warning:` |nbsp| :diagtext:`rvalue references are a C++11 extension`|
1157+------------------------------------------------------------------------------+
1158
1159+--------------------------------------------------------------------------------+
1160|:warning:`warning:` |nbsp| :diagtext:`scoped enumerations are a C++11 extension`|
1161+--------------------------------------------------------------------------------+
1162
1163+----------------------------------------------------------------------------------------------------------------------------------+
1164|:warning:`warning:` |nbsp| :diagtext:`static data member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in union is a C++11 extension`|
1165+----------------------------------------------------------------------------------------------------------------------------------+
1166
1167+--------------------------------------------------------------------------------------+----------------------+--------------------------------------------------------------------------------------+
1168|:warning:`warning:` |nbsp| :diagtext:`non-type template argument referring to` |nbsp| |+--------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`with internal linkage is a C++11 extension`|
1169| ||:diagtext:`function`|| |
1170| |+--------------------+| |
1171| ||:diagtext:`object` || |
1172| |+--------------------+| |
1173+--------------------------------------------------------------------------------------+----------------------+--------------------------------------------------------------------------------------+
1174
1175+-------------------------------------------------------------------------------+
1176|:warning:`warning:` |nbsp| :diagtext:`'template' keyword outside of a template`|
1177+-------------------------------------------------------------------------------+
1178
1179+---------------------------------------------------------------------------------------------------------------+
1180|:warning:`warning:` |nbsp| :diagtext:`default template arguments for a function template are a C++11 extension`|
1181+---------------------------------------------------------------------------------------------------------------+
1182
1183+-------------------------------------------------------------------+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1184|:warning:`warning:` |nbsp| :diagtext:`first declaration of` |nbsp| |+-------------------------------------+| |nbsp| :diagtext:`specialization of` |nbsp| :placeholder:`B` |nbsp| :diagtext:`outside namespace` |nbsp| :placeholder:`C` |nbsp| :diagtext:`is a C++11 extension`|
1185| ||:diagtext:`class template` || |
1186| |+-------------------------------------+| |
1187| ||:diagtext:`class template partial` || |
1188| |+-------------------------------------+| |
1189| ||:diagtext:`variable template` || |
1190| |+-------------------------------------+| |
1191| ||:diagtext:`variable template partial`|| |
1192| |+-------------------------------------+| |
1193| ||:diagtext:`function template` || |
1194| |+-------------------------------------+| |
1195| ||:diagtext:`member function` || |
1196| |+-------------------------------------+| |
1197| ||:diagtext:`static data member` || |
1198| |+-------------------------------------+| |
1199| ||:diagtext:`member class` || |
1200| |+-------------------------------------+| |
1201| ||:diagtext:`member enumeration` || |
1202| |+-------------------------------------+| |
1203+-------------------------------------------------------------------+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1204
1205+------------------------------------------------------------------------------+
1206|:warning:`warning:` |nbsp| :diagtext:`'typename' occurs outside of a template`|
1207+------------------------------------------------------------------------------+
1208
1209+------------------------------------------------------------------------------------------------------+-----------------------+-------------------------------------------------+
1210|:warning:`warning:` |nbsp| :diagtext:`unelaborated friend declaration is a C++11 extension; specify '`|+---------------------+|:diagtext:`' to befriend` |nbsp| :placeholder:`B`|
1211| ||:diagtext:`struct` || |
1212| |+---------------------+| |
1213| ||:diagtext:`interface`|| |
1214| |+---------------------+| |
1215| ||:diagtext:`union` || |
1216| |+---------------------+| |
1217| ||:diagtext:`class` || |
1218| |+---------------------+| |
1219| ||:diagtext:`enum` || |
1220| |+---------------------+| |
1221+------------------------------------------------------------------------------------------------------+-----------------------+-------------------------------------------------+
1222
1223+-------------------------------------------------------------------------------+
1224|:warning:`warning:` |nbsp| :diagtext:`variadic templates are a C++11 extension`|
1225+-------------------------------------------------------------------------------+
1226
1227
1228-Wc++11-extra-semi
1229------------------
1230**Diagnostic text:**
1231
1232+-------------------------------------------------------------------------------------------+
1233|:warning:`warning:` |nbsp| :diagtext:`extra ';' outside of a function is a C++11 extension`|
1234+-------------------------------------------------------------------------------------------+
1235
1236
1237-Wc++11-inline-namespace
1238------------------------
1239This diagnostic is enabled by default.
1240
1241**Diagnostic text:**
1242
1243+----------------------------------------------------------------------------+
1244|:warning:`warning:` |nbsp| :diagtext:`inline namespaces are a C++11 feature`|
1245+----------------------------------------------------------------------------+
1246
1247
1248-Wc++11-long-long
1249-----------------
1250**Diagnostic text:**
1251
1252+-----------------------------------------------------------------------+
1253|:warning:`warning:` |nbsp| :diagtext:`'long long' is a C++11 extension`|
1254+-----------------------------------------------------------------------+
1255
1256
1257-Wc++11-narrowing
1258-----------------
1259Some of the diagnostics controlled by this flag are enabled by default.
1260
1261**Diagnostic text:**
1262
1263+-----------------------+----------------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------+
1264|:error:`error:` |nbsp| |+--------------------------------------+| |nbsp| |+------------------------------------------------------------------------------------------------------------------------+|
1265| ||:diagtext:`case value` || ||+--------------------------------------------------------------------------------------------------------------+ ||
1266| |+--------------------------------------+| |||:diagtext:`cannot be narrowed from type` |nbsp| :placeholder:`C` |nbsp| :diagtext:`to` |nbsp| :placeholder:`D`| ||
1267| ||:diagtext:`enumerator value` || ||+--------------------------------------------------------------------------------------------------------------+ ||
1268| |+--------------------------------------+| |+------------------------------------------------------------------------------------------------------------------------+|
1269| ||:diagtext:`non-type template argument`|| ||+----------------------------------------------------------------------------------------------------------------------+||
1270| |+--------------------------------------+| |||:diagtext:`evaluates to` |nbsp| :placeholder:`C`:diagtext:`, which cannot be narrowed to type` |nbsp| :placeholder:`D`|||
1271| ||:diagtext:`array size` || ||+----------------------------------------------------------------------------------------------------------------------+||
1272| |+--------------------------------------+| |+------------------------------------------------------------------------------------------------------------------------+|
1273| ||:diagtext:`constexpr if condition` || | |
1274| |+--------------------------------------+| | |
1275+-----------------------+----------------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------+
1276
1277+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1278|:error:`error:` |nbsp| :diagtext:`constant expression evaluates to` |nbsp| :placeholder:`A` |nbsp| :diagtext:`which cannot be narrowed to type` |nbsp| :placeholder:`B`|
1279+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1280
1281+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1282|:error:`error:` |nbsp| :diagtext:`type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`cannot be narrowed to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`in initializer list`|
1283+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1284
1285+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1286|:error:`error:` |nbsp| :diagtext:`non-constant-expression cannot be narrowed from type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`in initializer list`|
1287+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1288
1289+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1290|:warning:`warning:` |nbsp| :diagtext:`constant expression evaluates to` |nbsp| :placeholder:`A` |nbsp| :diagtext:`which cannot be narrowed to type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`in C++11`|
1291+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1292
1293+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1294|:warning:`warning:` |nbsp| :diagtext:`type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`cannot be narrowed to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`in initializer list in C++11`|
1295+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1296
1297+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1298|:warning:`warning:` |nbsp| :diagtext:`non-constant-expression cannot be narrowed from type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`in initializer list in C++11`|
1299+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1300
1301
1302-Wc++14-binary-literal
1303----------------------
1304**Diagnostic text:**
1305
1306+------------------------------------------------------------------------------------+
1307|:warning:`warning:` |nbsp| :diagtext:`binary integer literals are a C++14 extension`|
1308+------------------------------------------------------------------------------------+
1309
1310
1311-Wc++14-compat
1312--------------
Richard Smith66310362017-10-26 21:06:52 +00001313Controls `-Wc++98-c++11-c++14-c++17-compat`_, `-Wc++98-c++11-c++14-compat`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001314
1315
1316-Wc++14-compat-pedantic
1317-----------------------
Richard Smith66310362017-10-26 21:06:52 +00001318Controls `-Wc++14-compat`_, `-Wc++98-c++11-c++14-c++17-compat-pedantic`_, `-Wc++98-c++11-c++14-compat-pedantic`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001319
1320
1321-Wc++14-extensions
1322------------------
1323Some of the diagnostics controlled by this flag are enabled by default.
1324
1325Also controls `-Wc++14-binary-literal`_.
1326
1327**Diagnostic text:**
1328
1329+-----------------------------------------------------------------------------------+-------------------------+----------------------------------------+
1330|:warning:`warning:` |nbsp| :diagtext:`use of this statement in a constexpr` |nbsp| |+-----------------------+| |nbsp| :diagtext:`is a C++14 extension`|
1331| ||:diagtext:`function` || |
1332| |+-----------------------+| |
1333| ||:diagtext:`constructor`|| |
1334| |+-----------------------+| |
1335+-----------------------------------------------------------------------------------+-------------------------+----------------------------------------+
1336
1337+------------------------------------------------------------------------------------------------------------+
1338|:warning:`warning:` |nbsp| :diagtext:`multiple return statements in constexpr function is a C++14 extension`|
1339+------------------------------------------------------------------------------------------------------------+
1340
1341+----------------------------------------------------------------------------------+-------------------------+----------------------------------------+
1342|:warning:`warning:` |nbsp| :diagtext:`variable declaration in a constexpr` |nbsp| |+-----------------------+| |nbsp| :diagtext:`is a C++14 extension`|
1343| ||:diagtext:`function` || |
1344| |+-----------------------+| |
1345| ||:diagtext:`constructor`|| |
1346| |+-----------------------+| |
1347+----------------------------------------------------------------------------------+-------------------------+----------------------------------------+
1348
1349+-----------------------------------------------------------------------------+-------------------------+----------------------------------------+
1350|:warning:`warning:` |nbsp| :diagtext:`type definition in a constexpr` |nbsp| |+-----------------------+| |nbsp| :diagtext:`is a C++14 extension`|
1351| ||:diagtext:`function` || |
1352| |+-----------------------+| |
1353| ||:diagtext:`constructor`|| |
1354| |+-----------------------+| |
1355+-----------------------------------------------------------------------------+-------------------------+----------------------------------------+
1356
1357+---------------------------------------------------------------------------------------------------------------------------+
1358|:warning:`warning:` |nbsp| :diagtext:`use of the` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute is a C++14 extension`|
1359+---------------------------------------------------------------------------------------------------------------------------+
1360
1361+-------------------------------------------------------------------------------------------+
1362|:warning:`warning:` |nbsp| :diagtext:`'decltype(auto)' type specifier is a C++14 extension`|
1363+-------------------------------------------------------------------------------------------+
1364
1365+----------------------------------------------------------------------------------------+
1366|:warning:`warning:` |nbsp| :diagtext:`initialized lambda captures are a C++14 extension`|
1367+----------------------------------------------------------------------------------------+
1368
1369+-------------------------------------------------------------------------------+
1370|:warning:`warning:` |nbsp| :diagtext:`variable templates are a C++14 extension`|
1371+-------------------------------------------------------------------------------+
1372
1373
Richard Smith66310362017-10-26 21:06:52 +00001374-Wc++17-compat
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001375--------------
Richard Smith66310362017-10-26 21:06:52 +00001376Some of the diagnostics controlled by this flag are enabled by default.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001377
Richard Smith66310362017-10-26 21:06:52 +00001378Controls `-Wc++17-compat-mangling`_, `-Wc++98-c++11-c++14-c++17-compat`_, `-Wdeprecated-increment-bool`_, `-Wdeprecated-register`_.
1379
1380
1381-Wc++17-compat-mangling
1382-----------------------
1383This diagnostic is enabled by default.
Richard Smithcf9f4222017-01-20 19:27:09 +00001384
1385**Diagnostic text:**
1386
1387+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1388|:warning:`warning:` |nbsp| :diagtext:`mangled name of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`will change in C++17 due to non-throwing exception specification in function signature`|
1389+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001390
1391
Richard Smith66310362017-10-26 21:06:52 +00001392-Wc++17-compat-pedantic
1393-----------------------
1394Some of the diagnostics controlled by this flag are enabled by default.
1395
1396Controls `-Wc++17-compat`_, `-Wc++98-c++11-c++14-c++17-compat-pedantic`_.
1397
1398
1399-Wc++17-extensions
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001400------------------
1401Some of the diagnostics controlled by this flag are enabled by default.
1402
1403**Diagnostic text:**
1404
1405+------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001406|:warning:`warning:` |nbsp| :diagtext:`constexpr if is a C++17 extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001407+------------------------------------------------------------------------+
1408
1409+---------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001410|:warning:`warning:` |nbsp| :diagtext:`'constexpr' on lambda expressions is a C++17 extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001411+---------------------------------------------------------------------------------------------+
1412
1413+---------------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001414|:warning:`warning:` |nbsp| :diagtext:`use of the` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute is a C++17 extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001415+---------------------------------------------------------------------------------------------------------------------------+
1416
1417+---------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001418|:warning:`warning:` |nbsp| :diagtext:`decomposition declarations are a C++17 extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001419+---------------------------------------------------------------------------------------+
1420
1421+--------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001422|:warning:`warning:` |nbsp| :diagtext:`pack fold expression is a C++17 extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001423+--------------------------------------------------------------------------------+
1424
1425+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001426|:warning:`warning:` |nbsp| :diagtext:`'begin' and 'end' returning different types (`:placeholder:`A` |nbsp| :diagtext:`and` |nbsp| :placeholder:`B`:diagtext:`) is a C++17 extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001427+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1428
1429+----------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001430|:warning:`warning:` |nbsp| :diagtext:`hexadecimal floating literals are a C++17 feature`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001431+----------------------------------------------------------------------------------------+
1432
Richard Smithcf9f4222017-01-20 19:27:09 +00001433+----------------------------------------+--------------------+-------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001434|:warning:`warning:` |nbsp| :diagtext:`'`|+------------------+|:diagtext:`' initialization statements are a C++17 extension`|
Richard Smithcf9f4222017-01-20 19:27:09 +00001435| ||:diagtext:`if` || |
1436| |+------------------+| |
1437| ||:diagtext:`switch`|| |
1438| |+------------------+| |
1439+----------------------------------------+--------------------+-------------------------------------------------------------+
1440
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001441+-----------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001442|:warning:`warning:` |nbsp| :diagtext:`inline variables are a C++17 extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001443+-----------------------------------------------------------------------------+
1444
Richard Smithcf9f4222017-01-20 19:27:09 +00001445+---------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001446|:warning:`warning:` |nbsp| :diagtext:`use of multiple declarators in a single using declaration is a C++17 extension`|
Richard Smithcf9f4222017-01-20 19:27:09 +00001447+---------------------------------------------------------------------------------------------------------------------+
1448
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001449+-------------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001450|:warning:`warning:` |nbsp| :diagtext:`nested namespace definition is a C++17 extension; define each namespace separately`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001451+-------------------------------------------------------------------------------------------------------------------------+
1452
Richard Smith66310362017-10-26 21:06:52 +00001453+------------------------------------------------------------+---------------------------+-----------------------------------------------------+
1454|:warning:`warning:` |nbsp| :diagtext:`attributes on` |nbsp| |+-------------------------+| |nbsp| :diagtext:`declaration are a C++17 extension`|
1455| ||:diagtext:`a namespace` || |
1456| |+-------------------------+| |
1457| ||:diagtext:`an enumerator`|| |
1458| |+-------------------------+| |
1459+------------------------------------------------------------+---------------------------+-----------------------------------------------------+
1460
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001461+---------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001462|:warning:`warning:` |nbsp| :diagtext:`capture of '\*this' by copy is a C++17 extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001463+---------------------------------------------------------------------------------------+
1464
1465+------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001466|:warning:`warning:` |nbsp| :diagtext:`static\_assert with no message is a C++17 extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001467+------------------------------------------------------------------------------------------+
1468
1469+--------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001470|:warning:`warning:` |nbsp| :diagtext:`template template parameter using 'typename' is a C++17 extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001471+--------------------------------------------------------------------------------------------------------+
1472
1473+--------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001474|:warning:`warning:` |nbsp| :diagtext:`default scope specifier for attributes is a C++17 extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001475+--------------------------------------------------------------------------------------------------+
1476
Richard Smithcf9f4222017-01-20 19:27:09 +00001477+-----------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001478|:warning:`warning:` |nbsp| :diagtext:`pack expansion of using declaration is a C++17 extension`|
Richard Smithcf9f4222017-01-20 19:27:09 +00001479+-----------------------------------------------------------------------------------------------+
1480
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001481
Richard Smith66310362017-10-26 21:06:52 +00001482-Wc++1y-extensions
1483------------------
1484Synonym for `-Wc++14-extensions`_.
1485
1486
1487-Wc++1z-compat
1488--------------
1489Synonym for `-Wc++17-compat`_.
1490
1491
1492-Wc++1z-compat-mangling
1493-----------------------
1494Synonym for `-Wc++17-compat-mangling`_.
1495
1496
1497-Wc++1z-extensions
1498------------------
1499Synonym for `-Wc++17-extensions`_.
1500
1501
1502-Wc++2a-compat
1503--------------
1504**Diagnostic text:**
1505
1506+-------------------------------------------------------------------------------------------+
1507|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' is a keyword in C++2a`|
1508+-------------------------------------------------------------------------------------------+
1509
1510
1511-Wc++2a-compat-pedantic
1512-----------------------
1513Synonym for `-Wc++2a-compat`_.
1514
1515
1516-Wc++2a-extensions
1517------------------
1518Some of the diagnostics controlled by this flag are enabled by default.
1519
1520**Diagnostic text:**
1521
1522+----------------------------------------------------------------------------------------------------+
1523|:warning:`warning:` |nbsp| :diagtext:`default member initializer for bit-field is a C++2a extension`|
1524+----------------------------------------------------------------------------------------------------+
1525
1526+--------------------------------------------------------------------------------------------------------------------+
1527|:warning:`warning:` |nbsp| :diagtext:`explicit capture of 'this' with a capture default of '=' is a C++2a extension`|
1528+--------------------------------------------------------------------------------------------------------------------+
1529
1530+--------------------------------------------------------------------------------------------------------------------------+
1531|:warning:`warning:` |nbsp| :diagtext:`invoking a pointer to a 'const &' member function on an rvalue is a C++2a extension`|
1532+--------------------------------------------------------------------------------------------------------------------------+
1533
1534
1535-Wc++98-c++11-c++14-c++17-compat
1536--------------------------------
1537**Diagnostic text:**
1538
1539+-------------------------------------------------------------------------------------------------------------------------------+
1540|:warning:`warning:` |nbsp| :diagtext:`default member initializer for bit-field is incompatible with C++ standards before C++2a`|
1541+-------------------------------------------------------------------------------------------------------------------------------+
1542
1543+-----------------------------------------------------------------------------------------------------------------------------------------------+
1544|:warning:`warning:` |nbsp| :diagtext:`explicit capture of 'this' with a capture default of '=' is incompatible with C++ standards before C++2a`|
1545+-----------------------------------------------------------------------------------------------------------------------------------------------+
1546
1547
1548-Wc++98-c++11-c++14-c++17-compat-pedantic
1549-----------------------------------------
1550Also controls `-Wc++98-c++11-c++14-c++17-compat`_.
1551
1552**Diagnostic text:**
1553
1554+-----------------------------------------------------------------------------------------------------------------------------------------------------+
1555|:warning:`warning:` |nbsp| :diagtext:`invoking a pointer to a 'const &' member function on an rvalue is incompatible with C++ standards before C++2a`|
1556+-----------------------------------------------------------------------------------------------------------------------------------------------------+
1557
1558
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001559-Wc++98-c++11-c++14-compat
1560--------------------------
1561**Diagnostic text:**
1562
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001563+---------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001564|:warning:`warning:` |nbsp| :diagtext:`constexpr if is incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001565+---------------------------------------------------------------------------------------------------+
1566
1567+----------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001568|:warning:`warning:` |nbsp| :diagtext:`constexpr on lambda expressions is incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001569+----------------------------------------------------------------------------------------------------------------------+
1570
1571+------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001572|:warning:`warning:` |nbsp| :diagtext:`decomposition declarations are incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001573+------------------------------------------------------------------------------------------------------------------+
1574
1575+-----------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001576|:warning:`warning:` |nbsp| :diagtext:`pack fold expression is incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001577+-----------------------------------------------------------------------------------------------------------+
1578
Richard Smithcf9f4222017-01-20 19:27:09 +00001579+---------------------------+--------------------+----------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001580|:warning:`warning:` |nbsp| |+------------------+| |nbsp| :diagtext:`initialization statements are incompatible with C++ standards before C++17`|
Richard Smithcf9f4222017-01-20 19:27:09 +00001581| ||:diagtext:`if` || |
1582| |+------------------+| |
1583| ||:diagtext:`switch`|| |
1584| |+------------------+| |
1585+---------------------------+--------------------+----------------------------------------------------------------------------------------------+
1586
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001587+--------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001588|:warning:`warning:` |nbsp| :diagtext:`inline variables are incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001589+--------------------------------------------------------------------------------------------------------+
1590
1591+------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001592|:warning:`warning:` |nbsp| :diagtext:`nested namespace definition is incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001593+------------------------------------------------------------------------------------------------------------------+
1594
1595+-------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001596|:warning:`warning:` |nbsp| :diagtext:`by value capture of '\*this' is incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001597+-------------------------------------------------------------------------------------------------------------------+
1598
1599+---------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001600|:warning:`warning:` |nbsp| :diagtext:`static\_assert with no message is incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001601+---------------------------------------------------------------------------------------------------------------------+
1602
Richard Smithcf9f4222017-01-20 19:27:09 +00001603+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001604|:warning:`warning:` |nbsp| :diagtext:`non-type template parameters declared with` |nbsp| :placeholder:`A` |nbsp| :diagtext:`are incompatible with C++ standards before C++17`|
Richard Smithcf9f4222017-01-20 19:27:09 +00001605+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1606
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001607+-----------------------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001608|:warning:`warning:` |nbsp| :diagtext:`template template parameter using 'typename' is incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001609+-----------------------------------------------------------------------------------------------------------------------------------+
1610
1611+--------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001612|:warning:`warning:` |nbsp| :diagtext:`unicode literals are incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001613+--------------------------------------------------------------------------------------------------------+
1614
1615+-----------------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001616|:warning:`warning:` |nbsp| :diagtext:`default scope specifier for attributes is incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001617+-----------------------------------------------------------------------------------------------------------------------------+
1618
Richard Smithcf9f4222017-01-20 19:27:09 +00001619+------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001620|:warning:`warning:` |nbsp| :diagtext:`use of multiple declarators in a single using declaration is incompatible with C++ standards before C++17`|
Richard Smithcf9f4222017-01-20 19:27:09 +00001621+------------------------------------------------------------------------------------------------------------------------------------------------+
1622
1623+-----------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001624|:warning:`warning:` |nbsp| :diagtext:`pack expansion using declaration is incompatible with C++ standards before C++17`|
Richard Smithcf9f4222017-01-20 19:27:09 +00001625+-----------------------------------------------------------------------------------------------------------------------+
1626
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001627+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001628|:warning:`warning:` |nbsp| :diagtext:`'begin' and 'end' returning different types (`:placeholder:`A` |nbsp| :diagtext:`and` |nbsp| :placeholder:`B`:diagtext:`) is incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001629+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1630
1631
1632-Wc++98-c++11-c++14-compat-pedantic
1633-----------------------------------
1634Also controls `-Wc++98-c++11-c++14-compat`_.
1635
1636**Diagnostic text:**
1637
Richard Smith66310362017-10-26 21:06:52 +00001638+------------------------------------------------------------+---------------------------+--------------------------------------------------------------------------------+
1639|:warning:`warning:` |nbsp| :diagtext:`attributes on` |nbsp| |+-------------------------+| |nbsp| :diagtext:`declaration are incompatible with C++ standards before C++17`|
1640| ||:diagtext:`a namespace` || |
1641| |+-------------------------+| |
1642| ||:diagtext:`an enumerator`|| |
1643| |+-------------------------+| |
1644+------------------------------------------------------------+---------------------------+--------------------------------------------------------------------------------+
1645
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001646+---------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00001647|:warning:`warning:` |nbsp| :diagtext:`hexadecimal floating literals are incompatible with C++ standards before C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001648+---------------------------------------------------------------------------------------------------------------------+
1649
1650
1651-Wc++98-c++11-compat
1652--------------------
1653**Diagnostic text:**
1654
1655+-----------------------------------------------------------------------------------+-------------------------+-------------------------------------------------------------------+
1656|:warning:`warning:` |nbsp| :diagtext:`use of this statement in a constexpr` |nbsp| |+-----------------------+| |nbsp| :diagtext:`is incompatible with C++ standards before C++14`|
1657| ||:diagtext:`function` || |
1658| |+-----------------------+| |
1659| ||:diagtext:`constructor`|| |
1660| |+-----------------------+| |
1661+-----------------------------------------------------------------------------------+-------------------------+-------------------------------------------------------------------+
1662
1663+---------------------------------------------------------------------------------------------------------------------------------------+
1664|:warning:`warning:` |nbsp| :diagtext:`multiple return statements in constexpr function is incompatible with C++ standards before C++14`|
1665+---------------------------------------------------------------------------------------------------------------------------------------+
1666
1667+-----------------------------------------------------------------------------------------------------------------------------------+
1668|:warning:`warning:` |nbsp| :diagtext:`constexpr function with no return statements is incompatible with C++ standards before C++14`|
1669+-----------------------------------------------------------------------------------------------------------------------------------+
1670
1671+----------------------------------------------------------------------------------+-------------------------+-------------------------------------------------------------------+
1672|:warning:`warning:` |nbsp| :diagtext:`variable declaration in a constexpr` |nbsp| |+-----------------------+| |nbsp| :diagtext:`is incompatible with C++ standards before C++14`|
1673| ||:diagtext:`function` || |
1674| |+-----------------------+| |
1675| ||:diagtext:`constructor`|| |
1676| |+-----------------------+| |
1677+----------------------------------------------------------------------------------+-------------------------+-------------------------------------------------------------------+
1678
1679+-----------------------------------------------------------------------------+-------------------------+-------------------------------------------------------------------+
1680|:warning:`warning:` |nbsp| :diagtext:`type definition in a constexpr` |nbsp| |+-----------------------+| |nbsp| :diagtext:`is incompatible with C++ standards before C++14`|
1681| ||:diagtext:`function` || |
1682| |+-----------------------+| |
1683| ||:diagtext:`constructor`|| |
1684| |+-----------------------+| |
1685+-----------------------------------------------------------------------------+-------------------------+-------------------------------------------------------------------+
1686
1687+----------------------------------------------------------------------------------------------------------------------+
1688|:warning:`warning:` |nbsp| :diagtext:`'decltype(auto)' type specifier is incompatible with C++ standards before C++14`|
1689+----------------------------------------------------------------------------------------------------------------------+
1690
1691+--------------------------------------------------------------------------------------------------------+
1692|:warning:`warning:` |nbsp| :diagtext:`digit separators are incompatible with C++ standards before C++14`|
1693+--------------------------------------------------------------------------------------------------------+
1694
1695+-------------------------------------------------------------------------------------------------------------------+
1696|:warning:`warning:` |nbsp| :diagtext:`initialized lambda captures are incompatible with C++ standards before C++14`|
1697+-------------------------------------------------------------------------------------------------------------------+
1698
1699+----------------------------------------------------------------------------------------------------------+
1700|:warning:`warning:` |nbsp| :diagtext:`variable templates are incompatible with C++ standards before C++14`|
1701+----------------------------------------------------------------------------------------------------------+
1702
1703
Richard Smith66310362017-10-26 21:06:52 +00001704-Wc++98-c++11-compat-binary-literal
1705-----------------------------------
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001706**Diagnostic text:**
1707
1708+---------------------------------------------------------------------------------------------------------------+
1709|:warning:`warning:` |nbsp| :diagtext:`binary integer literals are incompatible with C++ standards before C++14`|
1710+---------------------------------------------------------------------------------------------------------------+
1711
1712
Richard Smith66310362017-10-26 21:06:52 +00001713-Wc++98-c++11-compat-pedantic
1714-----------------------------
1715Controls `-Wc++98-c++11-compat`_, `-Wc++98-c++11-compat-binary-literal`_.
1716
1717
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001718-Wc++98-compat
1719--------------
Richard Smith66310362017-10-26 21:06:52 +00001720Also controls `-Wc++98-c++11-c++14-c++17-compat`_, `-Wc++98-c++11-c++14-compat`_, `-Wc++98-c++11-compat`_, `-Wc++98-compat-local-type-template-args`_, `-Wc++98-compat-unnamed-type-template-args`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00001721
1722**Diagnostic text:**
1723
1724+-------------------------------------------------------------------------------------+
1725|:warning:`warning:` |nbsp| :diagtext:`alias declarations are incompatible with C++98`|
1726+-------------------------------------------------------------------------------------+
1727
1728+---------------------------------------------------------------------------+
1729|:warning:`warning:` |nbsp| :diagtext:`'alignas' is incompatible with C++98`|
1730+---------------------------------------------------------------------------+
1731
1732+--------------------------------------------------------------------------------------+
1733|:warning:`warning:` |nbsp| :diagtext:`alignof expressions are incompatible with C++98`|
1734+--------------------------------------------------------------------------------------+
1735
1736+----------------------------------------------------------------------------------------+
1737|:warning:`warning:` |nbsp| :diagtext:`C++11 attribute syntax is incompatible with C++98`|
1738+----------------------------------------------------------------------------------------+
1739
1740+---------------------------------------------------------------------------------------+
1741|:warning:`warning:` |nbsp| :diagtext:`'auto' type specifier is incompatible with C++98`|
1742+---------------------------------------------------------------------------------------+
1743
1744+---------------------------------------------------------------------------------------+
1745|:warning:`warning:` |nbsp| :diagtext:`'constexpr' specifier is incompatible with C++98`|
1746+---------------------------------------------------------------------------------------+
1747
1748+--------------------------------------------------------------------------------------------------------+
1749|:warning:`warning:` |nbsp| :diagtext:`constructor call from initializer list is incompatible with C++98`|
1750+--------------------------------------------------------------------------------------------------------+
1751
1752+-------------------------------------------------------------------------------------------+
1753|:warning:`warning:` |nbsp| :diagtext:`'decltype' type specifier is incompatible with C++98`|
1754+-------------------------------------------------------------------------------------------+
1755
1756+---------------------------+-----------------------+--------------------------------------------------------------------+
1757|:warning:`warning:` |nbsp| |+---------------------+| |nbsp| :diagtext:`function definitions are incompatible with C++98`|
1758| ||:diagtext:`defaulted`|| |
1759| |+---------------------+| |
1760| ||:diagtext:`deleted` || |
1761| |+---------------------+| |
1762+---------------------------+-----------------------+--------------------------------------------------------------------+
1763
1764+------------------------------------------------------------------------------------------+
1765|:warning:`warning:` |nbsp| :diagtext:`delegating constructors are incompatible with C++98`|
1766+------------------------------------------------------------------------------------------+
1767
1768+----------------------------------------------------------------------------------------------------------------+
1769|:warning:`warning:` |nbsp| :diagtext:`scalar initialized from empty initializer list is incompatible with C++98`|
1770+----------------------------------------------------------------------------------------------------------------+
1771
1772+-----------------------------------------------------------------------------------------------------------------+
1773|:warning:`warning:` |nbsp| :diagtext:`enumeration types with a fixed underlying type are incompatible with C++98`|
1774+-----------------------------------------------------------------------------------------------------------------+
1775
1776+-----------------------------------------------------------------------------------------------------------------------------------------+
1777|:warning:`warning:` |nbsp| :diagtext:`befriending enumeration type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is incompatible with C++98`|
1778+-----------------------------------------------------------------------------------------------------------------------------------------+
1779
1780+-----------------------------------------------------------------------------------------------------------+
1781|:warning:`warning:` |nbsp| :diagtext:`enumeration type in nested name specifier is incompatible with C++98`|
1782+-----------------------------------------------------------------------------------------------------------+
1783
1784+------------------------------------------------------------------------------------------------+
1785|:warning:`warning:` |nbsp| :diagtext:`explicit conversion functions are incompatible with C++98`|
1786+------------------------------------------------------------------------------------------------+
1787
1788+--------------------------------------------------------------------------------------+
1789|:warning:`warning:` |nbsp| :diagtext:`range-based for loop is incompatible with C++98`|
1790+--------------------------------------------------------------------------------------+
1791
1792+---------------------------------------------------------------------------------------------------------------------------+
1793|:warning:`warning:` |nbsp| :diagtext:`friend declaration naming a member of the declaring class is incompatible with C++98`|
1794+---------------------------------------------------------------------------------------------------------------------------+
1795
1796+------------------------------------------------------------------------------------------------+
1797|:warning:`warning:` |nbsp| :diagtext:`generalized initializer lists are incompatible with C++98`|
1798+------------------------------------------------------------------------------------------------+
1799
1800+------------------------------------------------------------------------------------------------------------+
1801|:warning:`warning:` |nbsp| :diagtext:`jump from this goto statement to its label is incompatible with C++98`|
1802+------------------------------------------------------------------------------------------------------------+
1803
1804+---------------------------------------------------------------------------------------------------------------------------------------+
1805|:warning:`warning:` |nbsp| :diagtext:`jump from this indirect goto statement to one of its possible targets is incompatible with C++98`|
1806+---------------------------------------------------------------------------------------------------------------------------------------+
1807
1808+------------------------------------------------------------------------------------------------------------+
1809|:warning:`warning:` |nbsp| :diagtext:`initialization of initializer\_list object is incompatible with C++98`|
1810+------------------------------------------------------------------------------------------------------------+
1811
1812+------------------------------------------------------------------------------------+
1813|:warning:`warning:` |nbsp| :diagtext:`inline namespaces are incompatible with C++98`|
1814+------------------------------------------------------------------------------------+
1815
1816+-------------------------------------------------------------------------------------+
1817|:warning:`warning:` |nbsp| :diagtext:`lambda expressions are incompatible with C++98`|
1818+-------------------------------------------------------------------------------------+
1819
1820+-----------------------------------------------------------------------------------------------------------+
1821|:warning:`warning:` |nbsp| :diagtext:`'<::' is treated as digraph '<:' (aka '\[') followed by ':' in C++98`|
1822+-----------------------------------------------------------------------------------------------------------+
1823
1824+------------------------------------------------------------------------------------+
1825|:warning:`warning:` |nbsp| :diagtext:`literal operators are incompatible with C++98`|
1826+------------------------------------------------------------------------------------+
1827
1828+---------------------------------------------------------------------------------------------------------------------------+
1829|:warning:`warning:` |nbsp| :diagtext:`universal character name referring to a control character is incompatible with C++98`|
1830+---------------------------------------------------------------------------------------------------------------------------+
1831
1832+-----------------------------------------------------------------------------------------------------------------------------------------------------+
1833|:warning:`warning:` |nbsp| :diagtext:`specifying character '`:placeholder:`A`:diagtext:`' with a universal character name is incompatible with C++98`|
1834+-----------------------------------------------------------------------------------------------------------------------------------------------------+
1835
1836+------------------------------------------------------------------------------------------+
1837|:warning:`warning:` |nbsp| :diagtext:`noexcept specifications are incompatible with C++98`|
1838+------------------------------------------------------------------------------------------+
1839
1840+---------------------------------------------------------------------------------------+
1841|:warning:`warning:` |nbsp| :diagtext:`noexcept expressions are incompatible with C++98`|
1842+---------------------------------------------------------------------------------------+
1843
1844+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1845|:warning:`warning:` |nbsp| :diagtext:`use of non-static data member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in an unevaluated context is incompatible with C++98`|
1846+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1847
1848+----------------------------------------------------------------------------------------------------------------------------------+
1849|:warning:`warning:` |nbsp| :diagtext:`non-class friend type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is incompatible with C++98`|
1850+----------------------------------------------------------------------------------------------------------------------------------+
1851
1852+--------------------------------------------------------------------------------------------------------------------+
1853|:warning:`warning:` |nbsp| :diagtext:`in-class initialization of non-static data members is incompatible with C++98`|
1854+--------------------------------------------------------------------------------------------------------------------+
1855
1856+---------------------------+------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+----------------------------------------------+
1857|:warning:`warning:` |nbsp| |+----------------------------+| |nbsp| :diagtext:`member` |nbsp| :placeholder:`B` |nbsp| :diagtext:`with a non-trivial` |nbsp| |+------------------------------------+| |nbsp| :diagtext:`is incompatible with C++98`|
1858| ||:diagtext:`anonymous struct`|| ||:diagtext:`constructor` || |
1859| |+----------------------------+| |+------------------------------------+| |
1860| ||:diagtext:`union` || ||:diagtext:`copy constructor` || |
1861| |+----------------------------+| |+------------------------------------+| |
1862| | | ||:diagtext:`move constructor` || |
1863| | | |+------------------------------------+| |
1864| | | ||:diagtext:`copy assignment operator`|| |
1865| | | |+------------------------------------+| |
1866| | | ||:diagtext:`move assignment operator`|| |
1867| | | |+------------------------------------+| |
1868| | | ||:diagtext:`destructor` || |
1869| | | |+------------------------------------+| |
1870+---------------------------+------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+----------------------------------------------+
1871
1872+---------------------------------------------------------------------------+
1873|:warning:`warning:` |nbsp| :diagtext:`'nullptr' is incompatible with C++98`|
1874+---------------------------------------------------------------------------+
1875
1876+--------------------------------------------------------------------------------------------------------+
1877|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' keyword is incompatible with C++98`|
1878+--------------------------------------------------------------------------------------------------------+
1879
1880+-----------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------+
1881|:warning:`warning:` |nbsp| :diagtext:`passing object of trivial but non-POD type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`through variadic` |nbsp| |+-----------------------+| |nbsp| :diagtext:`is incompatible with C++98`|
1882| ||:diagtext:`function` || |
1883| |+-----------------------+| |
1884| ||:diagtext:`block` || |
1885| |+-----------------------+| |
1886| ||:diagtext:`method` || |
1887| |+-----------------------+| |
1888| ||:diagtext:`constructor`|| |
1889| |+-----------------------+| |
1890+-----------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------+
1891
1892+--------------------------------------------------------------------------------------+
1893|:warning:`warning:` |nbsp| :diagtext:`raw string literals are incompatible with C++98`|
1894+--------------------------------------------------------------------------------------+
1895
1896+----------------------------------------------------------------------------------------------------+
1897|:warning:`warning:` |nbsp| :diagtext:`reference qualifiers on functions are incompatible with C++98`|
1898+----------------------------------------------------------------------------------------------------+
1899
1900+-------------------------------------------------------------------------------------------------------------+
1901|:warning:`warning:` |nbsp| :diagtext:`reference initialized from initializer list is incompatible with C++98`|
1902+-------------------------------------------------------------------------------------------------------------+
1903
1904+------------------------------------------------------------------------------------+
1905|:warning:`warning:` |nbsp| :diagtext:`rvalue references are incompatible with C++98`|
1906+------------------------------------------------------------------------------------+
1907
1908+--------------------------------------------------------------------------------------+
1909|:warning:`warning:` |nbsp| :diagtext:`scoped enumerations are incompatible with C++98`|
1910+--------------------------------------------------------------------------------------+
1911
1912+------------------------------------------------------------------------------------------------------------+
1913|:warning:`warning:` |nbsp| :diagtext:`substitution failure due to access control is incompatible with C++98`|
1914+------------------------------------------------------------------------------------------------------------+
1915
1916+----------------------------------------------------------------------------------------------+
1917|:warning:`warning:` |nbsp| :diagtext:`static\_assert declarations are incompatible with C++98`|
1918+----------------------------------------------------------------------------------------------+
1919
1920+----------------------------------------------------------------------------------------------------------------------------------------+
1921|:warning:`warning:` |nbsp| :diagtext:`static data member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in union is incompatible with C++98`|
1922+----------------------------------------------------------------------------------------------------------------------------------------+
1923
1924+---------------------------------------------------------------------------------------------------------------+
1925|:warning:`warning:` |nbsp| :diagtext:`jump from switch statement to this case label is incompatible with C++98`|
1926+---------------------------------------------------------------------------------------------------------------+
1927
1928+---------------------------------------------------------------------------------------------------------------------------------------+
1929|:warning:`warning:` |nbsp| :diagtext:`redundant parentheses surrounding address non-type template argument are incompatible with C++98`|
1930+---------------------------------------------------------------------------------------------------------------------------------------+
1931
1932+-------------------------------------------------------------------------------------------------------------------+
1933|:warning:`warning:` |nbsp| :diagtext:`use of null pointer as non-type template argument is incompatible with C++98`|
1934+-------------------------------------------------------------------------------------------------------------------+
1935
1936+--------------------------------------------------------------------------------------+----------------------+--------------------------------------------------------------------------------------------+
1937|:warning:`warning:` |nbsp| :diagtext:`non-type template argument referring to` |nbsp| |+--------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`with internal linkage is incompatible with C++98`|
1938| ||:diagtext:`function`|| |
1939| |+--------------------+| |
1940| ||:diagtext:`object` || |
1941| |+--------------------+| |
1942+--------------------------------------------------------------------------------------+----------------------+--------------------------------------------------------------------------------------------+
1943
1944+-----------------------------------------------------------------------------------------------------------------+
1945|:warning:`warning:` |nbsp| :diagtext:`use of 'template' keyword outside of a template is incompatible with C++98`|
1946+-----------------------------------------------------------------------------------------------------------------+
1947
1948+---------------------------------------------------------------------------------------------------------------------+
1949|:warning:`warning:` |nbsp| :diagtext:`default template arguments for a function template are incompatible with C++98`|
1950+---------------------------------------------------------------------------------------------------------------------+
1951
1952+---------------------------+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1953|:warning:`warning:` |nbsp| |+-------------------------------------+| |nbsp| :diagtext:`specialization of` |nbsp| :placeholder:`B` |nbsp| :diagtext:`outside namespace` |nbsp| :placeholder:`C` |nbsp| :diagtext:`is incompatible with C++98`|
1954| ||:diagtext:`class template` || |
1955| |+-------------------------------------+| |
1956| ||:diagtext:`class template partial` || |
1957| |+-------------------------------------+| |
1958| ||:diagtext:`variable template` || |
1959| |+-------------------------------------+| |
1960| ||:diagtext:`variable template partial`|| |
1961| |+-------------------------------------+| |
1962| ||:diagtext:`function template` || |
1963| |+-------------------------------------+| |
1964| ||:diagtext:`member function` || |
1965| |+-------------------------------------+| |
1966| ||:diagtext:`static data member` || |
1967| |+-------------------------------------+| |
1968| ||:diagtext:`member class` || |
1969| |+-------------------------------------+| |
1970| ||:diagtext:`member enumeration` || |
1971| |+-------------------------------------+| |
1972+---------------------------+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1973
1974+----------------------------------------------------------------------------------------+
1975|:warning:`warning:` |nbsp| :diagtext:`trailing return types are incompatible with C++98`|
1976+----------------------------------------------------------------------------------------+
1977
1978+---------------------------------------------------------------------------------------------------------------+
1979|:warning:`warning:` |nbsp| :diagtext:`consecutive right angle brackets are incompatible with C++98 (use '> >')`|
1980+---------------------------------------------------------------------------------------------------------------+
1981
1982+---------------------------------------------------------------------------------------------------------+
1983|:warning:`warning:` |nbsp| :diagtext:`use of 'typename' outside of a template is incompatible with C++98`|
1984+---------------------------------------------------------------------------------------------------------+
1985
1986+-------------------------------------------------------------------------------------------------------+-----------------------+------------------------------------------------+
1987|:warning:`warning:` |nbsp| :diagtext:`befriending` |nbsp| :placeholder:`B` |nbsp| :diagtext:`without '`|+---------------------+|:diagtext:`' keyword is incompatible with C++98`|
1988| ||:diagtext:`struct` || |
1989| |+---------------------+| |
1990| ||:diagtext:`interface`|| |
1991| |+---------------------+| |
1992| ||:diagtext:`union` || |
1993| |+---------------------+| |
1994| ||:diagtext:`class` || |
1995| |+---------------------+| |
1996| ||:diagtext:`enum` || |
1997| |+---------------------+| |
1998+-------------------------------------------------------------------------------------------------------+-----------------------+------------------------------------------------+
1999
2000+-------------------------------------------------------------------------------------------------------+
2001|:warning:`warning:` |nbsp| :diagtext:`using this character in an identifier is incompatible with C++98`|
2002+-------------------------------------------------------------------------------------------------------+
2003
2004+-----------------------------------------------------------------------------------+
2005|:warning:`warning:` |nbsp| :diagtext:`unicode literals are incompatible with C++98`|
2006+-----------------------------------------------------------------------------------+
2007
2008+---------------------------------------------------------------------------------------------------------------+
2009|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' type specifier is incompatible with C++98`|
2010+---------------------------------------------------------------------------------------------------------------+
2011
2012+------------------------------------------------------------------------------------------+
2013|:warning:`warning:` |nbsp| :diagtext:`inheriting constructors are incompatible with C++98`|
2014+------------------------------------------------------------------------------------------+
2015
2016+-------------------------------------------------------------------------------------+
2017|:warning:`warning:` |nbsp| :diagtext:`variadic templates are incompatible with C++98`|
2018+-------------------------------------------------------------------------------------+
2019
2020
2021-Wc++98-compat-bind-to-temporary-copy
2022-------------------------------------
2023**Diagnostic text:**
2024
2025+---------------------------+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------+----------------------------+
2026|:warning:`warning:` |nbsp| |+---------------------------------------+| |nbsp| :diagtext:`of type` |nbsp| :placeholder:`C` |nbsp| :diagtext:`when binding a reference to a temporary would` |nbsp| |+----------------------------------------------+| |nbsp| :diagtext:`in C++98`|
2027| ||:diagtext:`copying variable` || ||:diagtext:`invoke an inaccessible constructor`|| |
2028| |+---------------------------------------+| |+----------------------------------------------+| |
2029| ||:diagtext:`copying parameter` || ||:diagtext:`find no viable constructor` || |
2030| |+---------------------------------------+| |+----------------------------------------------+| |
2031| ||:diagtext:`returning object` || ||:diagtext:`find ambiguous constructors` || |
2032| |+---------------------------------------+| |+----------------------------------------------+| |
2033| ||:diagtext:`throwing object` || ||:diagtext:`invoke a deleted constructor` || |
2034| |+---------------------------------------+| |+----------------------------------------------+| |
2035| ||:diagtext:`copying member subobject` || | | |
2036| |+---------------------------------------+| | | |
2037| ||:diagtext:`copying array element` || | | |
2038| |+---------------------------------------+| | | |
2039| ||:diagtext:`allocating object` || | | |
2040| |+---------------------------------------+| | | |
2041| ||:diagtext:`copying temporary` || | | |
2042| |+---------------------------------------+| | | |
2043| ||:diagtext:`initializing base subobject`|| | | |
2044| |+---------------------------------------+| | | |
2045| ||:diagtext:`initializing vector element`|| | | |
2046| |+---------------------------------------+| | | |
2047+---------------------------+-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------+----------------------------+
2048
2049
2050-Wc++98-compat-local-type-template-args
2051---------------------------------------
2052**Diagnostic text:**
2053
2054+--------------------------------------------------------------------------------------------------------------------------------------------+
2055|:warning:`warning:` |nbsp| :diagtext:`local type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`as template argument is incompatible with C++98`|
2056+--------------------------------------------------------------------------------------------------------------------------------------------+
2057
2058
2059-Wc++98-compat-pedantic
2060-----------------------
Richard Smith66310362017-10-26 21:06:52 +00002061Also controls `-Wc++98-c++11-c++14-c++17-compat-pedantic`_, `-Wc++98-c++11-c++14-compat-pedantic`_, `-Wc++98-c++11-compat-pedantic`_, `-Wc++98-compat`_, `-Wc++98-compat-bind-to-temporary-copy`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002062
2063**Diagnostic text:**
2064
2065+---------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------------------------------------------------------+
2066|:warning:`warning:` |nbsp| :diagtext:`implicit conversion from array size expression of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| |+-----------------------+| |nbsp| :diagtext:`type` |nbsp| :placeholder:`C` |nbsp| :diagtext:`is incompatible with C++98`|
2067| ||:diagtext:`integral` || |
2068| |+-----------------------+| |
2069| ||:diagtext:`enumeration`|| |
2070| |+-----------------------+| |
2071+---------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------------------------------------------------------+
2072
2073+------------------------------------------------------------------------------------------------------------------------+
2074|:warning:`warning:` |nbsp| :diagtext:`cast between pointer-to-function and pointer-to-object is incompatible with C++98`|
2075+------------------------------------------------------------------------------------------------------------------------+
2076
2077+----------------------------------------------------------------------------------------+
2078|:warning:`warning:` |nbsp| :diagtext:`empty macro arguments are incompatible with C++98`|
2079+----------------------------------------------------------------------------------------+
2080
2081+--------------------------------------------------------------------------------------------------------+
2082|:warning:`warning:` |nbsp| :diagtext:`commas at the end of enumerator lists are incompatible with C++98`|
2083+--------------------------------------------------------------------------------------------------------+
2084
2085+-----------------------------------------------------------------------------------+
2086|:warning:`warning:` |nbsp| :diagtext:`extern templates are incompatible with C++98`|
2087+-----------------------------------------------------------------------------------+
2088
2089+-----------------------------------------------------------------------------+
2090|:warning:`warning:` |nbsp| :diagtext:`'long long' is incompatible with C++98`|
2091+-----------------------------------------------------------------------------+
2092
2093+----------------------------------------------------------------------------+
2094|:warning:`warning:` |nbsp| :diagtext:`C++98 requires newline at end of file`|
2095+----------------------------------------------------------------------------+
2096
2097+-------------------------------------------------------------------------------------------------+
2098|:warning:`warning:` |nbsp| :diagtext:`#line number greater than 32767 is incompatible with C++98`|
2099+-------------------------------------------------------------------------------------------------+
2100
2101+-------------------------------------------------------------------------------------------------+
2102|:warning:`warning:` |nbsp| :diagtext:`extra ';' outside of a function is incompatible with C++98`|
2103+-------------------------------------------------------------------------------------------------+
2104
2105+----------------------------------------------------------------------------------+
2106|:warning:`warning:` |nbsp| :diagtext:`variadic macros are incompatible with C++98`|
2107+----------------------------------------------------------------------------------+
2108
2109
2110-Wc++98-compat-unnamed-type-template-args
2111-----------------------------------------
2112**Diagnostic text:**
2113
2114+---------------------------------------------------------------------------------------------------+
2115|:warning:`warning:` |nbsp| :diagtext:`unnamed type as template argument is incompatible with C++98`|
2116+---------------------------------------------------------------------------------------------------+
2117
2118
2119-Wc11-extensions
2120----------------
2121**Diagnostic text:**
2122
2123+---------------------------------------------------------------------------+
2124|:warning:`warning:` |nbsp| :diagtext:`anonymous unions are a C11 extension`|
2125+---------------------------------------------------------------------------+
2126
2127+----------------------------------------------------------------------------------------+
2128|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a C11-specific feature`|
2129+----------------------------------------------------------------------------------------+
2130
2131+----------------------------------------------------------------------------+
2132|:warning:`warning:` |nbsp| :diagtext:`anonymous structs are a C11 extension`|
2133+----------------------------------------------------------------------------+
2134
2135+------------------------------------------------------------------------------------+
2136|:warning:`warning:` |nbsp| :diagtext:`generic selections are a C11-specific feature`|
2137+------------------------------------------------------------------------------------+
2138
2139+--------------------------------------------------------------------------------------+
2140|:warning:`warning:` |nbsp| :diagtext:`\_Noreturn functions are a C11-specific feature`|
2141+--------------------------------------------------------------------------------------+
2142
2143+---------------------------------------------------------------------------------+
2144|:warning:`warning:` |nbsp| :diagtext:`\_Static\_assert is a C11-specific feature`|
2145+---------------------------------------------------------------------------------+
2146
2147
2148-Wc99-compat
2149------------
2150Some of the diagnostics controlled by this flag are enabled by default.
2151
2152**Diagnostic text:**
2153
2154+---------------------------+--------------------------------------------------------+--------------------------------------------+
2155|:warning:`warning:` |nbsp| |+------------------------------------------------------+| |nbsp| :diagtext:`is incompatible with C99`|
2156| ||:diagtext:`using this character in an identifier` || |
2157| |+------------------------------------------------------+| |
2158| ||:diagtext:`starting an identifier with this character`|| |
2159| |+------------------------------------------------------+| |
2160+---------------------------+--------------------------------------------------------+--------------------------------------------+
2161
2162+---------------------------------------------------------------------------------+
2163|:warning:`warning:` |nbsp| :diagtext:`unicode literals are incompatible with C99`|
2164+---------------------------------------------------------------------------------+
2165
2166+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+----------------------------------+
2167|:warning:`warning:` |nbsp| :diagtext:`integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will` |nbsp| |+---------------------------------+| |nbsp| :diagtext:`in C99 onwards`|
2168| ||:diagtext:`have type 'long long'`|| |
2169| |+---------------------------------+| |
2170| ||:diagtext:`be ill-formed` || |
2171| |+---------------------------------+| |
2172+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+----------------------------------+
2173
2174
2175-Wc99-extensions
2176----------------
2177Some of the diagnostics controlled by this flag are enabled by default.
2178
2179**Diagnostic text:**
2180
2181+-----------------------------------------------------------------------------------------------+
2182|:warning:`warning:` |nbsp| :diagtext:`initializer for aggregate is not a compile-time constant`|
2183+-----------------------------------------------------------------------------------------------+
2184
2185+---------------------------+----------------------------------+------------------------------+-----------------------+----------------------------+
2186|:warning:`warning:` |nbsp| |+--------------------------------+|:diagtext:`array size` |nbsp| |+---------------------+|:diagtext:`is a C99 feature`|
2187| ||:diagtext:`qualifier in` |nbsp| || || || |
2188| |+--------------------------------+| |+---------------------+| |
2189| ||:diagtext:`static` |nbsp| || || || |
2190| |+--------------------------------+| |+---------------------+| |
2191| || || ||:diagtext:`'\[\*\] '`|| |
2192| |+--------------------------------+| |+---------------------+| |
2193+---------------------------+----------------------------------+------------------------------+-----------------------+----------------------------+
2194
2195+-----------------------------------------------------------------------------------+
2196|:warning:`warning:` |nbsp| :diagtext:`compound literals are a C99-specific feature`|
2197+-----------------------------------------------------------------------------------+
2198
2199+-------------------------------------------------------------------------------+
2200|:warning:`warning:` |nbsp| :diagtext:`flexible array members are a C99 feature`|
2201+-------------------------------------------------------------------------------+
2202
2203+-------------------------------------------------------------------------------------------------+
2204|:warning:`warning:` |nbsp| :diagtext:`variable declaration in for loop is a C99-specific feature`|
2205+-------------------------------------------------------------------------------------------------+
2206
2207+---------------------------------------------------------------------------------------+
2208|:warning:`warning:` |nbsp| :diagtext:`ISO C99 requires whitespace after the macro name`|
2209+---------------------------------------------------------------------------------------+
2210
2211+--------------------------------------------------------------------------------+
2212|:warning:`warning:` |nbsp| :diagtext:`designated initializers are a C99 feature`|
2213+--------------------------------------------------------------------------------+
2214
2215+------------------------------------------------------------------------------+
2216|:warning:`warning:` |nbsp| :diagtext:`empty macro arguments are a C99 feature`|
2217+------------------------------------------------------------------------------+
2218
2219+-------------------------------------------------------------------------------------------------------+
2220|:warning:`warning:` |nbsp| :diagtext:`commas at the end of enumerator lists are a C99-specific feature`|
2221+-------------------------------------------------------------------------------------------------------+
2222
2223+---------------------------------------------------------------------------------------+
2224|:warning:`warning:` |nbsp| :diagtext:`hexadecimal floating constants are a C99 feature`|
2225+---------------------------------------------------------------------------------------+
2226
2227
2228-Wcast-align
2229------------
2230**Diagnostic text:**
2231
2232+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2233|:warning:`warning:` |nbsp| :diagtext:`cast from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`increases required alignment from` |nbsp| :placeholder:`C` |nbsp| :diagtext:`to` |nbsp| :placeholder:`D`|
2234+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2235
2236
2237-Wcast-calling-convention
2238-------------------------
2239This diagnostic is enabled by default.
2240
2241**Diagnostic text:**
2242
2243+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2244|:warning:`warning:` |nbsp| :diagtext:`cast between incompatible calling conventions '`:placeholder:`A`:diagtext:`' and '`:placeholder:`B`:diagtext:`'; calls through this pointer may abort at runtime`|
2245+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2246
2247
2248-Wcast-of-sel-type
2249------------------
2250This diagnostic is enabled by default.
2251
2252**Diagnostic text:**
2253
2254+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2255|:warning:`warning:` |nbsp| :diagtext:`cast of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`is deprecated; use sel\_getName instead`|
2256+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2257
2258
2259-Wcast-qual
2260-----------
2261**Diagnostic text:**
2262
2263+-------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------+
2264|:warning:`warning:` |nbsp| :diagtext:`cast from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`drops` |nbsp| |+-----------------------------------------+|
2265| ||:diagtext:`const and volatile qualifiers`||
2266| |+-----------------------------------------+|
2267| ||:diagtext:`const qualifier` ||
2268| |+-----------------------------------------+|
2269| ||:diagtext:`volatile qualifier` ||
2270| |+-----------------------------------------+|
2271+-------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------+
2272
2273+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2274|:warning:`warning:` |nbsp| :diagtext:`cast from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`must have all intermediate pointers const qualified to be safe`|
2275+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2276
2277
2278-Wchar-align
2279------------
2280This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
2281
2282-Wchar-subscripts
2283-----------------
2284**Diagnostic text:**
2285
2286+------------------------------------------------------------+-------------------------+-------------------------------------+
2287|:warning:`warning:` |nbsp| :diagtext:`array section` |nbsp| |+-----------------------+| |nbsp| :diagtext:`is of type 'char'`|
2288| ||:diagtext:`lower bound`|| |
2289| |+-----------------------+| |
2290| ||:diagtext:`length` || |
2291| |+-----------------------+| |
2292+------------------------------------------------------------+-------------------------+-------------------------------------+
2293
2294+------------------------------------------------------------------------+
2295|:warning:`warning:` |nbsp| :diagtext:`array subscript is of type 'char'`|
2296+------------------------------------------------------------------------+
2297
2298
2299-Wclang-cl-pch
2300--------------
2301This diagnostic is enabled by default.
2302
2303**Diagnostic text:**
2304
2305+-------------------------------------------------------------------------------------------------------------------------+
2306|:warning:`warning:` |nbsp| :diagtext:`support for '/Yc' with more than one source file not implemented yet; flag ignored`|
2307+-------------------------------------------------------------------------------------------------------------------------+
2308
2309+------------------------------------------------------------------------------------------------------------------------------+
2310|:warning:`warning:` |nbsp| :diagtext:`support for '/Yc' and '/Yu' with different filenames not implemented yet; flags ignored`|
2311+------------------------------------------------------------------------------------------------------------------------------+
2312
2313+--------------------------------------------------------------------------------------------------------------------------------------+
2314|:warning:`warning:` |nbsp| :diagtext:`support for '`:placeholder:`A`:diagtext:`' without a filename not implemented yet; flag ignored`|
2315+--------------------------------------------------------------------------------------------------------------------------------------+
2316
2317+----------------------------------------------------------------------------------------------------------------------------------------------------+
2318|:warning:`warning:` |nbsp| :diagtext:`support for '`:placeholder:`A`:diagtext:`' without a corresponding /FI flag not implemented yet; flag ignored`|
2319+----------------------------------------------------------------------------------------------------------------------------------------------------+
2320
2321
2322-Wclass-varargs
2323---------------
2324Some of the diagnostics controlled by this flag are enabled by default.
2325
2326Also controls `-Wnon-pod-varargs`_.
2327
2328**Diagnostic text:**
2329
2330+---------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------------------------------+
2331|:warning:`warning:` |nbsp| :diagtext:`passing object of class type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`through variadic` |nbsp| |+-----------------------+|+--------------------------------------------------------------------+|
2332| ||:diagtext:`function` ||| ||
2333| |+-----------------------+|+--------------------------------------------------------------------+|
2334| ||:diagtext:`block` |||+------------------------------------------------------------------+||
2335| |+-----------------------+|||:diagtext:`; did you mean to call '`:placeholder:`D`:diagtext:`'?`|||
2336| ||:diagtext:`method` |||+------------------------------------------------------------------+||
2337| |+-----------------------+|+--------------------------------------------------------------------+|
2338| ||:diagtext:`constructor`|| |
2339| |+-----------------------+| |
2340+---------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------------------------------+
2341
2342
2343-Wcomma
2344-------
2345**Diagnostic text:**
2346
2347+-----------------------------------------------------------------------------+
2348|:warning:`warning:` |nbsp| :diagtext:`possible misuse of comma operator here`|
2349+-----------------------------------------------------------------------------+
2350
2351
2352-Wcomment
2353---------
2354Some of the diagnostics controlled by this flag are enabled by default.
2355
2356**Diagnostic text:**
2357
2358+--------------------------------------------------------------------------------------------------+
2359|:warning:`warning:` |nbsp| :diagtext:`escaped newline between \*/ characters at block comment end`|
2360+--------------------------------------------------------------------------------------------------+
2361
2362+-----------------------------------------------------------------------------------+
2363|:warning:`warning:` |nbsp| :diagtext:`// comments are not allowed in this language`|
2364+-----------------------------------------------------------------------------------+
2365
2366+------------------------------------------------------------+
2367|:warning:`warning:` |nbsp| :diagtext:`multi-line // comment`|
2368+------------------------------------------------------------+
2369
2370+-----------------------------------------------------------------+
2371|:warning:`warning:` |nbsp| :diagtext:`'/\*' within block comment`|
2372+-----------------------------------------------------------------+
2373
2374
2375-Wcomments
2376----------
2377Synonym for `-Wcomment`_.
2378
2379
2380-Wcompare-distinct-pointer-types
2381--------------------------------
2382This diagnostic is enabled by default.
2383
2384**Diagnostic text:**
2385
2386+---------------------------------------------------------------------------+
2387|:warning:`warning:` |nbsp| :diagtext:`comparison of distinct pointer types`|
2388+---------------------------------------------------------------------------+
2389
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002390
2391-Wcomplex-component-init
2392------------------------
2393**Diagnostic text:**
2394
2395+----------------------------------------------------------------------------------------------------------------------+
2396|:warning:`warning:` |nbsp| :diagtext:`complex initialization specifying real and imaginary components is an extension`|
2397+----------------------------------------------------------------------------------------------------------------------+
2398
2399
2400-Wconditional-type-mismatch
2401---------------------------
2402This diagnostic is enabled by default.
2403
2404**Diagnostic text:**
2405
2406+----------------------------------------------------------------------------------------------+
2407|:warning:`warning:` |nbsp| :diagtext:`pointer/integer type mismatch in conditional expression`|
2408+----------------------------------------------------------------------------------------------+
2409
2410
2411-Wconditional-uninitialized
2412---------------------------
2413**Diagnostic text:**
2414
2415+----------------------------------------------------------------------------------------------------------------------------+-------------------------------+
2416|:warning:`warning:` |nbsp| :diagtext:`variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`may be uninitialized when` |nbsp| |+-----------------------------+|
2417| ||:diagtext:`used here` ||
2418| |+-----------------------------+|
2419| ||:diagtext:`captured by block`||
2420| |+-----------------------------+|
2421+----------------------------------------------------------------------------------------------------------------------------+-------------------------------+
2422
2423
2424-Wconfig-macros
2425---------------
2426This diagnostic is enabled by default.
2427
2428**Diagnostic text:**
2429
2430+---------------------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------+---------------------------------------------------------+
2431|:warning:`warning:` |nbsp| |+----------------------+| |nbsp| :diagtext:`of configuration macro '`:placeholder:`B`:diagtext:`' has no effect on the import of '`:placeholder:`C`:diagtext:`'; pass '`|+------------------------------------------------+|:diagtext:`' on the command line to configure the module`|
2432| ||:diagtext:`definition`|| ||+----------------------------------------------+|| |
2433| |+----------------------+| |||:diagtext:`-D`:placeholder:`B`:diagtext:`=...`||| |
2434| ||:diagtext:`#undef` || ||+----------------------------------------------+|| |
2435| |+----------------------+| |+------------------------------------------------+| |
2436| | | ||+------------------------------+ || |
2437| | | |||:diagtext:`-U`:placeholder:`B`| || |
2438| | | ||+------------------------------+ || |
2439| | | |+------------------------------------------------+| |
2440+---------------------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------+---------------------------------------------------------+
2441
2442
2443-Wconstant-conversion
2444---------------------
2445This diagnostic is enabled by default.
2446
2447Also controls `-Wbitfield-constant-conversion`_.
2448
2449**Diagnostic text:**
2450
2451+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2452|:warning:`warning:` |nbsp| :diagtext:`implicit conversion from` |nbsp| :placeholder:`C` |nbsp| :diagtext:`to` |nbsp| :placeholder:`D` |nbsp| :diagtext:`changes value from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
2453+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2454
2455
2456-Wconstant-logical-operand
2457--------------------------
2458This diagnostic is enabled by default.
2459
2460**Diagnostic text:**
2461
2462+----------------------------------------------------------------------------------------------------------+
2463|:warning:`warning:` |nbsp| :diagtext:`use of logical '`:placeholder:`A`:diagtext:`' with constant operand`|
2464+----------------------------------------------------------------------------------------------------------+
2465
2466
2467-Wconstexpr-not-const
2468---------------------
2469This diagnostic is enabled by default.
2470
2471**Diagnostic text:**
2472
2473+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
2474|:warning:`warning:` |nbsp| :diagtext:`'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior`|
2475+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
2476
2477
2478-Wconsumed
2479----------
2480**Diagnostic text:**
2481
2482+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
2483|:warning:`warning:` |nbsp| :diagtext:`consumed analysis attribute is attached to member of class '`:placeholder:`A`:diagtext:`' which isn't marked as consumable`|
2484+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
2485
2486+--------------------------------------------------------------------------------------------------------------------------------+
2487|:warning:`warning:` |nbsp| :diagtext:`state of variable '`:placeholder:`A`:diagtext:`' must match at the entry and exit of loop`|
2488+--------------------------------------------------------------------------------------------------------------------------------+
2489
2490+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2491|:warning:`warning:` |nbsp| :diagtext:`parameter '`:placeholder:`A`:diagtext:`' not in expected state when the function returns: expected '`:placeholder:`B`:diagtext:`', observed '`:placeholder:`C`:diagtext:`'`|
2492+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2493
2494+-------------------------------------------------------------------------------------------------------------------------------------------------------+
2495|:warning:`warning:` |nbsp| :diagtext:`argument not in expected state; expected '`:placeholder:`A`:diagtext:`', observed '`:placeholder:`B`:diagtext:`'`|
2496+-------------------------------------------------------------------------------------------------------------------------------------------------------+
2497
2498+---------------------------------------------------------------------------------------------------------------+
2499|:warning:`warning:` |nbsp| :diagtext:`return state set for an unconsumable type '`:placeholder:`A`:diagtext:`'`|
2500+---------------------------------------------------------------------------------------------------------------+
2501
2502+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
2503|:warning:`warning:` |nbsp| :diagtext:`return value not in expected state; expected '`:placeholder:`A`:diagtext:`', observed '`:placeholder:`B`:diagtext:`'`|
2504+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
2505
2506+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2507|:warning:`warning:` |nbsp| :diagtext:`invalid invocation of method '`:placeholder:`A`:diagtext:`' on object '`:placeholder:`B`:diagtext:`' while it is in the '`:placeholder:`C`:diagtext:`' state`|
2508+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2509
2510+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2511|:warning:`warning:` |nbsp| :diagtext:`invalid invocation of method '`:placeholder:`A`:diagtext:`' on a temporary object while it is in the '`:placeholder:`B`:diagtext:`' state`|
2512+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2513
2514
2515-Wconversion
2516------------
2517Some of the diagnostics controlled by this flag are enabled by default.
2518
Richard Smith9a016602017-04-13 22:44:22 +00002519Also controls `-Wbitfield-enum-conversion`_, `-Wbool-conversion`_, `-Wconstant-conversion`_, `-Wenum-conversion`_, `-Wfloat-conversion`_, `-Wint-conversion`_, `-Wliteral-conversion`_, `-Wnon-literal-null-conversion`_, `-Wnull-conversion`_, `-Wobjc-literal-conversion`_, `-Wshorten-64-to-32`_, `-Wsign-conversion`_, `-Wstring-conversion`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002520
2521**Diagnostic text:**
2522
2523+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
2524|:warning:`warning:` |nbsp| :diagtext:`implicit conversion discards imaginary component:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
2525+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
2526
2527+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
2528|:warning:`warning:` |nbsp| :diagtext:`implicit conversion loses floating-point precision:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
2529+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
2530
2531+---------------------------------------------------------------------------------------------------------------------------------------------------------+
2532|:warning:`warning:` |nbsp| :diagtext:`implicit conversion loses integer precision:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
2533+---------------------------------------------------------------------------------------------------------------------------------------------------------+
2534
2535+--------------------------------------------------------------------------------------------------------------------------------------------------------+
2536|:warning:`warning:` |nbsp| :diagtext:`implicit conversion turns vector to scalar:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
2537+--------------------------------------------------------------------------------------------------------------------------------------------------------+
2538
2539+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2540|:warning:`warning:` |nbsp| :diagtext:`non-type template argument with value '`:placeholder:`A`:diagtext:`' converted to '`:placeholder:`B`:diagtext:`' for unsigned template parameter of type` |nbsp| :placeholder:`C`|
2541+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2542
2543+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2544|:warning:`warning:` |nbsp| :diagtext:`non-type template argument value '`:placeholder:`A`:diagtext:`' truncated to '`:placeholder:`B`:diagtext:`' for template parameter of type` |nbsp| :placeholder:`C`|
2545+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2546
2547
2548-Wconversion-null
2549-----------------
2550Synonym for `-Wnull-conversion`_.
2551
2552
Richard Smith9a016602017-04-13 22:44:22 +00002553-Wcoroutine
2554-----------
Richard Smith66310362017-10-26 21:06:52 +00002555Synonym for `-Wcoroutine-missing-unhandled-exception`_.
2556
2557
2558-Wcoroutine-missing-unhandled-exception
2559---------------------------------------
Richard Smith9a016602017-04-13 22:44:22 +00002560This diagnostic is enabled by default.
2561
2562**Diagnostic text:**
2563
2564+-----------------------------------------------------------------------------------------------------------------------------------------------------+
2565|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is required to declare the member 'unhandled\_exception()' when exceptions are enabled`|
2566+-----------------------------------------------------------------------------------------------------------------------------------------------------+
2567
2568
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002569-Wcovered-switch-default
2570------------------------
2571**Diagnostic text:**
2572
2573+--------------------------------------------------------------------------------------------------+
2574|:warning:`warning:` |nbsp| :diagtext:`default label in switch which covers all enumeration values`|
2575+--------------------------------------------------------------------------------------------------+
2576
2577
Richard Smith66310362017-10-26 21:06:52 +00002578-Wcpp
2579-----
2580Synonym for `-W#warnings`_.
2581
2582
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002583-Wcstring-format-directive
2584--------------------------
2585**Diagnostic text:**
2586
2587+------------------------------------------------------------------------------------------------------------+----------------------+--------------------------------------------------------------------------------------------+------------------------+
2588|:warning:`warning:` |nbsp| :diagtext:`using` |nbsp| :placeholder:`A` |nbsp| :diagtext:`directive in` |nbsp| |+--------------------+| |nbsp| :diagtext:`which is being passed as a formatting argument to the formatting` |nbsp| |+----------------------+|
2589| ||:diagtext:`NSString`|| ||:diagtext:`method` ||
2590| |+--------------------+| |+----------------------+|
2591| ||:diagtext:`CFString`|| ||:diagtext:`CFfunction`||
2592| |+--------------------+| |+----------------------+|
2593+------------------------------------------------------------------------------------------------------------+----------------------+--------------------------------------------------------------------------------------------+------------------------+
2594
2595
2596-Wctor-dtor-privacy
2597-------------------
2598This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
2599
2600-Wcuda-compat
2601-------------
2602Some of the diagnostics controlled by this flag are enabled by default.
2603
2604**Diagnostic text:**
2605
2606+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
2607|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute parameter` |nbsp| :placeholder:`B` |nbsp| :diagtext:`is negative and will be ignored`|
2608+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
2609
Richard Smithcf9f4222017-01-20 19:27:09 +00002610+---------------------------------------------------------------------------------------------------------------------------------+
2611|:warning:`warning:` |nbsp| :diagtext:`nvcc does not allow '\_\_`:placeholder:`A`:diagtext:`\_\_' to appear after '()' in lambdas`|
2612+---------------------------------------------------------------------------------------------------------------------------------+
2613
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002614+------------------------------------------------------------------------------------------------------------+
2615|:warning:`warning:` |nbsp| :diagtext:`ignored 'inline' attribute on kernel function` |nbsp| :placeholder:`A`|
2616+------------------------------------------------------------------------------------------------------------+
2617
2618+--------------------------------------------------------------------------------------------------------------------------------------------------------+
2619|:warning:`warning:` |nbsp| :diagtext:`kernel function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a member function; this may not be accepted by nvcc`|
2620+--------------------------------------------------------------------------------------------------------------------------------------------------------+
2621
2622+--------------------------------------------------------------------------------------------------------------+
2623|:warning:`warning:` |nbsp| :diagtext:`argument to '#pragma unroll' should not be in parentheses in CUDA C/C++`|
2624+--------------------------------------------------------------------------------------------------------------+
2625
2626
2627-Wcustom-atomic-properties
2628--------------------------
2629**Diagnostic text:**
2630
2631+---------------------------------------------------------------------------------------------------------------------------------------+--------------------+----------------------------------------------------------------------------+
2632|:warning:`warning:` |nbsp| :diagtext:`atomic by default property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has a user defined` |nbsp| |+------------------+| |nbsp| :diagtext:`(property should be marked 'atomic' if this is intended)`|
2633| ||:diagtext:`getter`|| |
2634| |+------------------+| |
2635| ||:diagtext:`setter`|| |
2636| |+------------------+| |
2637+---------------------------------------------------------------------------------------------------------------------------------------+--------------------+----------------------------------------------------------------------------+
2638
2639
2640-Wdangling-else
2641---------------
2642This diagnostic is enabled by default.
2643
2644**Diagnostic text:**
2645
2646+---------------------------------------------------------------------------------+
2647|:warning:`warning:` |nbsp| :diagtext:`add explicit braces to avoid dangling else`|
2648+---------------------------------------------------------------------------------+
2649
2650
2651-Wdangling-field
2652----------------
2653This diagnostic is enabled by default.
2654
2655**Diagnostic text:**
2656
2657+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
2658|:warning:`warning:` |nbsp| :diagtext:`binding reference member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to stack allocated parameter` |nbsp| :placeholder:`B`|
2659+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
2660
2661+----------------------------------------------------------------+----------------------------------+----------------------------------------------------------------------------------+
2662|:warning:`warning:` |nbsp| :diagtext:`binding reference` |nbsp| |+--------------------------------+|:diagtext:`member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to a temporary value`|
2663| || || |
2664| |+--------------------------------+| |
2665| ||:diagtext:`subobject of` |nbsp| || |
2666| |+--------------------------------+| |
2667+----------------------------------------------------------------+----------------------------------+----------------------------------------------------------------------------------+
2668
2669+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2670|:warning:`warning:` |nbsp| :diagtext:`initializing pointer member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`with the stack address of parameter` |nbsp| :placeholder:`B`|
2671+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2672
2673
2674-Wdangling-initializer-list
2675---------------------------
2676This diagnostic is enabled by default.
2677
2678**Diagnostic text:**
2679
2680+-----------------------------------------------------------------------------------------------------------------+---------------------------------+
2681|:warning:`warning:` |nbsp| :diagtext:`array backing the initializer list will be destroyed at the end of` |nbsp| |+-------------------------------+|
2682| ||:diagtext:`the full-expression`||
2683| |+-------------------------------+|
2684| ||:diagtext:`the constructor` ||
2685| |+-------------------------------+|
2686+-----------------------------------------------------------------------------------------------------------------+---------------------------------+
2687
2688
2689-Wdate-time
2690-----------
2691**Diagnostic text:**
2692
2693+------------------------------------------------------------------------------------------+
2694|:warning:`warning:` |nbsp| :diagtext:`expansion of date or time macro is not reproducible`|
2695+------------------------------------------------------------------------------------------+
2696
2697
2698-Wdealloc-in-category
2699---------------------
2700This diagnostic is enabled by default.
2701
2702**Diagnostic text:**
2703
2704+---------------------------------------------------------------------------------+
2705|:warning:`warning:` |nbsp| :diagtext:`-dealloc is being overridden in a category`|
2706+---------------------------------------------------------------------------------+
2707
2708
2709-Wdebug-compression-unavailable
2710-------------------------------
2711This diagnostic is enabled by default.
2712
2713**Diagnostic text:**
2714
2715+------------------------------------------------------------------------------------------+
2716|:warning:`warning:` |nbsp| :diagtext:`cannot compress debug sections (zlib not installed)`|
2717+------------------------------------------------------------------------------------------+
2718
2719
2720-Wdeclaration-after-statement
2721-----------------------------
2722**Diagnostic text:**
2723
2724+-----------------------------------------------------------------------------------+
2725|:warning:`warning:` |nbsp| :diagtext:`ISO C90 forbids mixing declarations and code`|
2726+-----------------------------------------------------------------------------------+
2727
2728
2729-Wdelegating-ctor-cycles
2730------------------------
2731This diagnostic is an error by default, but the flag ``-Wno-delegating-ctor-cycles`` can be used to disable the error.
2732
2733**Diagnostic text:**
2734
2735+------------------------------------------------------------------------------------------------------------------------+
2736|:error:`error:` |nbsp| :diagtext:`constructor for` |nbsp| :placeholder:`A` |nbsp| :diagtext:`creates a delegation cycle`|
2737+------------------------------------------------------------------------------------------------------------------------+
2738
2739
2740-Wdelete-incomplete
2741-------------------
2742This diagnostic is enabled by default.
2743
2744**Diagnostic text:**
2745
2746+-------------------------------------------------------------------------------------------------------------------+
2747|:warning:`warning:` |nbsp| :diagtext:`cannot delete expression with pointer-to-'void' type` |nbsp| :placeholder:`A`|
2748+-------------------------------------------------------------------------------------------------------------------+
2749
2750+--------------------------------------------------------------------------------------------------------------------------------------------------+
2751|:warning:`warning:` |nbsp| :diagtext:`deleting pointer to incomplete type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`may cause undefined behavior`|
2752+--------------------------------------------------------------------------------------------------------------------------------------------------+
2753
2754
2755-Wdelete-non-virtual-dtor
2756-------------------------
2757Some of the diagnostics controlled by this flag are enabled by default.
2758
2759**Diagnostic text:**
2760
2761+---------------------------+------------------------+------------------------------------------------------------------------------------------------------------------------+
2762|:warning:`warning:` |nbsp| |+----------------------+| |nbsp| :diagtext:`called on` |nbsp| :placeholder:`B` |nbsp| :diagtext:`that is abstract but has non-virtual destructor`|
2763| ||:diagtext:`delete` || |
2764| |+----------------------+| |
2765| ||:diagtext:`destructor`|| |
2766| |+----------------------+| |
2767+---------------------------+------------------------+------------------------------------------------------------------------------------------------------------------------+
2768
2769+---------------------------+------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
2770|:warning:`warning:` |nbsp| |+----------------------+| |nbsp| :diagtext:`called on non-final` |nbsp| :placeholder:`B` |nbsp| :diagtext:`that has virtual functions but non-virtual destructor`|
2771| ||:diagtext:`delete` || |
2772| |+----------------------+| |
2773| ||:diagtext:`destructor`|| |
2774| |+----------------------+| |
2775+---------------------------+------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
2776
2777
2778-Wdeprecated
2779------------
2780Some of the diagnostics controlled by this flag are enabled by default.
2781
Richard Smithcf9f4222017-01-20 19:27:09 +00002782Also controls `-Wdeprecated-attributes`_, `-Wdeprecated-declarations`_, `-Wdeprecated-dynamic-exception-spec`_, `-Wdeprecated-increment-bool`_, `-Wdeprecated-register`_, `-Wdeprecated-writable-strings`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002783
2784**Diagnostic text:**
2785
2786+---------------------------------------------------------------+
2787|:warning:`warning:` |nbsp| :diagtext:`-O4 is equivalent to -O3`|
2788+---------------------------------------------------------------+
2789
2790+---------------------------------------------------------------------------------------------------------+
2791|:warning:`warning:` |nbsp| :diagtext:`access declarations are deprecated; use using declarations instead`|
2792+---------------------------------------------------------------------------------------------------------+
2793
2794+--------------------------------------------------------------------------+---------------------------------+-----------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------+
2795|:warning:`warning:` |nbsp| :diagtext:`definition of implicit copy` |nbsp| |+-------------------------------+| |nbsp| :diagtext:`for` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is deprecated because it has a user-declared` |nbsp| |+------------------------------------------------------------+|
2796| ||:diagtext:`constructor` || ||+------------------------+---------------------------------+||
2797| |+-------------------------------+| |||:diagtext:`copy` |nbsp| |+-------------------------------+|||
2798| ||:diagtext:`assignment operator`|| ||| ||:diagtext:`assignment operator`||||
2799| |+-------------------------------+| ||| |+-------------------------------+|||
2800| | | ||| ||:diagtext:`constructor` ||||
2801| | | ||| |+-------------------------------+|||
2802| | | ||+------------------------+---------------------------------+||
2803| | | |+------------------------------------------------------------+|
2804| | | ||:diagtext:`destructor` ||
2805| | | |+------------------------------------------------------------+|
2806+--------------------------------------------------------------------------+---------------------------------+-----------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------+
2807
2808+-------------------------------------------------------------------------------------------------------------------------------------+
2809|:warning:`warning:` |nbsp| :diagtext:`out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated`|
2810+-------------------------------------------------------------------------------------------------------------------------------------+
2811
2812+----------------------------------------------------------------------------------------------------------------------------------------+
2813|:warning:`warning:` |nbsp| :diagtext:`argument '`:placeholder:`A`:diagtext:`' is deprecated, use '`:placeholder:`B`:diagtext:`' instead`|
2814+----------------------------------------------------------------------------------------------------------------------------------------+
2815
2816+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2817|:warning:`warning:` |nbsp| :diagtext:`treating '`:placeholder:`A`:diagtext:`' input as '`:placeholder:`B`:diagtext:`' when in C++ mode, this behavior is deprecated`|
2818+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2819
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002820+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
2821|:warning:`warning:` |nbsp| :diagtext:`OpenCL version` |nbsp| :placeholder:`A` |nbsp| :diagtext:`does not support the option '`:placeholder:`B`:diagtext:`'`|
2822+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
2823
2824+------------------------------------------------------------------------------------+
2825|:warning:`warning:` |nbsp| :diagtext:`Use of 'long' with '\_\_vector' is deprecated`|
2826+------------------------------------------------------------------------------------+
2827
2828
2829-Wdeprecated-attributes
2830-----------------------
2831This diagnostic is enabled by default.
2832
2833**Diagnostic text:**
2834
2835+------------------------------------------------------------------------------------------------------------------------------------------------+
2836|:warning:`warning:` |nbsp| :diagtext:`specifying vector types with the 'mode' attribute is deprecated; use the 'vector\_size' attribute instead`|
2837+------------------------------------------------------------------------------------------------------------------------------------------------+
2838
2839
2840-Wdeprecated-declarations
2841-------------------------
2842This diagnostic is enabled by default.
2843
2844**Diagnostic text:**
2845
Richard Smith66310362017-10-26 21:06:52 +00002846+--------------------------------------------------------------------------------------------------------------------+
2847|:warning:`warning:` |nbsp| :diagtext:`specifying 'uuid' as an ATL attribute is deprecated; use \_\_declspec instead`|
2848+--------------------------------------------------------------------------------------------------------------------+
2849
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002850+-----------------------------------------------------------------------------------------------------------------+
2851|:warning:`warning:` |nbsp| :diagtext:`use of C-style parameters in Objective-C method declarations is deprecated`|
2852+-----------------------------------------------------------------------------------------------------------------+
2853
2854+----------------------------------------------------------------------------+
2855|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is deprecated`|
2856+----------------------------------------------------------------------------+
2857
2858+---------------------------------------------------------------------------------------------------------------------+
2859|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`may be deprecated because the receiver type is unknown`|
2860+---------------------------------------------------------------------------------------------------------------------+
2861
2862+-----------------------------------------------------------------------------------------------------+
2863|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is deprecated:` |nbsp| :placeholder:`B`|
2864+-----------------------------------------------------------------------------------------------------+
2865
2866+-------------------------------------------------------------------------------------------------------------------------------------+
2867|:warning:`warning:` |nbsp| :diagtext:`property access is using` |nbsp| :placeholder:`A` |nbsp| :diagtext:`method which is deprecated`|
2868+-------------------------------------------------------------------------------------------------------------------------------------+
2869
2870
Richard Smithcf9f4222017-01-20 19:27:09 +00002871-Wdeprecated-dynamic-exception-spec
2872-----------------------------------
2873**Diagnostic text:**
2874
2875+--------------------------------------------------------------------------------------+
2876|:warning:`warning:` |nbsp| :diagtext:`dynamic exception specifications are deprecated`|
2877+--------------------------------------------------------------------------------------+
2878
2879
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002880-Wdeprecated-implementations
2881----------------------------
2882**Diagnostic text:**
2883
2884+----------------------------------------------------------------------+----------------------+
Richard Smith66310362017-10-26 21:06:52 +00002885|:warning:`warning:` |nbsp| :diagtext:`implementing deprecated` |nbsp| |+--------------------+|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002886| ||:diagtext:`method` ||
2887| |+--------------------+|
2888| ||:diagtext:`class` ||
2889| |+--------------------+|
2890| ||:diagtext:`category`||
2891| |+--------------------+|
2892+----------------------------------------------------------------------+----------------------+
2893
Richard Smith66310362017-10-26 21:06:52 +00002894+----------------------------------------------------------------------+
2895|:warning:`warning:` |nbsp| :diagtext:`implementing unavailable method`|
2896+----------------------------------------------------------------------+
2897
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002898
2899-Wdeprecated-increment-bool
2900---------------------------
2901This diagnostic is enabled by default.
2902
2903**Diagnostic text:**
2904
2905+---------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00002906|:warning:`warning:` |nbsp| :diagtext:`incrementing expression of type bool is deprecated and incompatible with C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002907+---------------------------------------------------------------------------------------------------------------------+
2908
2909
2910-Wdeprecated-objc-isa-usage
2911---------------------------
2912This diagnostic is enabled by default.
2913
2914**Diagnostic text:**
2915
2916+-------------------------------------------------------------------------------------------------------------------+
2917|:warning:`warning:` |nbsp| :diagtext:`assignment to Objective-C's isa is deprecated in favor of object\_setClass()`|
2918+-------------------------------------------------------------------------------------------------------------------+
2919
2920+----------------------------------------------------------------------------------------------------------------------+
2921|:warning:`warning:` |nbsp| :diagtext:`direct access to Objective-C's isa is deprecated in favor of object\_getClass()`|
2922+----------------------------------------------------------------------------------------------------------------------+
2923
2924
2925-Wdeprecated-objc-pointer-introspection
2926---------------------------------------
2927This diagnostic is enabled by default.
2928
2929Also controls `-Wdeprecated-objc-pointer-introspection-performSelector`_.
2930
2931**Diagnostic text:**
2932
2933+--------------------------------------------------------------------------------------------------------------------------+
2934|:warning:`warning:` |nbsp| :diagtext:`bitmasking for introspection of Objective-C object pointers is strongly discouraged`|
2935+--------------------------------------------------------------------------------------------------------------------------+
2936
2937
2938-Wdeprecated-objc-pointer-introspection-performSelector
2939-------------------------------------------------------
2940This diagnostic is enabled by default.
2941
2942**Diagnostic text:**
2943
2944+--------------------------------------------------------------------------------------------------------------------------+
2945|:warning:`warning:` |nbsp| :diagtext:`bitmasking for introspection of Objective-C object pointers is strongly discouraged`|
2946+--------------------------------------------------------------------------------------------------------------------------+
2947
2948
2949-Wdeprecated-register
2950---------------------
2951This diagnostic is enabled by default.
2952
2953**Diagnostic text:**
2954
2955+-------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00002956|:warning:`warning:` |nbsp| :diagtext:`'register' storage class specifier is deprecated and incompatible with C++17`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00002957+-------------------------------------------------------------------------------------------------------------------+
2958
2959
2960-Wdeprecated-writable-strings
2961-----------------------------
2962Synonym for `-Wc++11-compat-deprecated-writable-strings`_.
2963
2964
2965-Wdirect-ivar-access
2966--------------------
2967**Diagnostic text:**
2968
2969+------------------------------------------------------------------------------------------------------------------------------+
2970|:warning:`warning:` |nbsp| :diagtext:`instance variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is being directly accessed`|
2971+------------------------------------------------------------------------------------------------------------------------------+
2972
2973
2974-Wdisabled-macro-expansion
2975--------------------------
2976**Diagnostic text:**
2977
2978+----------------------------------------------------------------------------+
2979|:warning:`warning:` |nbsp| :diagtext:`disabled expansion of recursive macro`|
2980+----------------------------------------------------------------------------+
2981
2982
2983-Wdisabled-optimization
2984-----------------------
2985This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
2986
2987-Wdiscard-qual
2988--------------
2989This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
2990
2991-Wdistributed-object-modifiers
2992------------------------------
2993This diagnostic is enabled by default.
2994
2995**Diagnostic text:**
2996
2997+----------------------------------------------------------------------------------------------------------------------------------------------+
2998|:warning:`warning:` |nbsp| :diagtext:`conflicting distributed object modifiers on parameter type in implementation of` |nbsp| :placeholder:`A`|
2999+----------------------------------------------------------------------------------------------------------------------------------------------+
3000
3001+-------------------------------------------------------------------------------------------------------------------------------------------+
3002|:warning:`warning:` |nbsp| :diagtext:`conflicting distributed object modifiers on return type in implementation of` |nbsp| :placeholder:`A`|
3003+-------------------------------------------------------------------------------------------------------------------------------------------+
3004
3005
3006-Wdiv-by-zero
3007-------------
Richard Smithce9d5862016-09-14 01:51:10 +00003008Synonym for `-Wdivision-by-zero`_.
3009
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003010
3011-Wdivision-by-zero
3012------------------
3013This diagnostic is enabled by default.
3014
3015**Diagnostic text:**
3016
3017+---------------------------+-----------------------+----------------------------------------+
3018|:warning:`warning:` |nbsp| |+---------------------+| |nbsp| :diagtext:`by zero is undefined`|
3019| ||:diagtext:`remainder`|| |
3020| |+---------------------+| |
3021| ||:diagtext:`division` || |
3022| |+---------------------+| |
3023+---------------------------+-----------------------+----------------------------------------+
3024
3025
3026-Wdll-attribute-on-redeclaration
3027--------------------------------
3028This diagnostic is enabled by default.
3029
3030**Diagnostic text:**
3031
3032+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3033|:warning:`warning:` |nbsp| :diagtext:`redeclaration of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`should not add` |nbsp| :placeholder:`B` |nbsp| :diagtext:`attribute`|
3034+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3035
3036
3037-Wdllexport-explicit-instantiation-decl
3038---------------------------------------
3039This diagnostic is enabled by default.
3040
3041**Diagnostic text:**
3042
3043+---------------------------------------------------------------------------------------------------+
3044|:warning:`warning:` |nbsp| :diagtext:`explicit instantiation declaration should not be 'dllexport'`|
3045+---------------------------------------------------------------------------------------------------+
3046
3047
3048-Wdllimport-static-field-def
3049----------------------------
3050This diagnostic is enabled by default.
3051
3052**Diagnostic text:**
3053
3054+---------------------------------------------------------------------------+
3055|:warning:`warning:` |nbsp| :diagtext:`definition of dllimport static field`|
3056+---------------------------------------------------------------------------+
3057
3058
3059-Wdocumentation
3060---------------
Richard Smith8cba2912016-09-14 01:55:42 +00003061Also controls `-Wdocumentation-deprecated-sync`_, `-Wdocumentation-html`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003062
3063**Diagnostic text:**
3064
3065+----------------------------------------+----------------+-----------------------+------------------------------------------------------------------------+-----------------------+-------------------------------+
3066|:warning:`warning:` |nbsp| :diagtext:`'`|+--------------+|+---------------------+|:diagtext:`' command should not be used in a comment attached to a non-`|+---------------------+| |nbsp| :diagtext:`declaration`|
3067| ||:diagtext:`\\`|||:diagtext:`class` || ||:diagtext:`class` || |
3068| |+--------------+|+---------------------+| |+---------------------+| |
3069| ||:diagtext:`@` |||:diagtext:`interface`|| ||:diagtext:`interface`|| |
3070| |+--------------+|+---------------------+| |+---------------------+| |
3071| | ||:diagtext:`protocol` || ||:diagtext:`protocol` || |
3072| | |+---------------------+| |+---------------------+| |
3073| | ||:diagtext:`struct` || ||:diagtext:`struct` || |
3074| | |+---------------------+| |+---------------------+| |
3075| | ||:diagtext:`union` || ||:diagtext:`union` || |
3076| | |+---------------------+| |+---------------------+| |
3077+----------------------------------------+----------------+-----------------------+------------------------------------------------------------------------+-----------------------+-------------------------------+
3078
3079+-----------------------------------------------------------+----------------+-----------------------------+
3080|:warning:`warning:` |nbsp| :diagtext:`duplicated command '`|+--------------+|:placeholder:`B`:diagtext:`'`|
3081| ||:diagtext:`\\`|| |
3082| |+--------------+| |
3083| ||:diagtext:`@` || |
3084| |+--------------+| |
3085+-----------------------------------------------------------+----------------+-----------------------------+
3086
3087+------------------------------------------------------------------+----------------+-------------------------------------+
3088|:warning:`warning:` |nbsp| :diagtext:`empty paragraph passed to '`|+--------------+|:placeholder:`B`:diagtext:`' command`|
3089| ||:diagtext:`\\`|| |
3090| |+--------------+| |
3091| ||:diagtext:`@` || |
3092| |+--------------+| |
3093+------------------------------------------------------------------+----------------+-------------------------------------+
3094
3095+----------------------------------------+----------------+--------------------------+---------------------------------------------------------------------------------------------+
3096|:warning:`warning:` |nbsp| :diagtext:`'`|+--------------+|+------------------------+|:diagtext:`' command should not be used in a comment attached to a non-container declaration`|
3097| ||:diagtext:`\\`|||:diagtext:`classdesign` || |
3098| |+--------------+|+------------------------+| |
3099| ||:diagtext:`@` |||:diagtext:`coclass` || |
3100| |+--------------+|+------------------------+| |
3101| | ||:diagtext:`dependency` || |
3102| | |+------------------------+| |
3103| | ||:diagtext:`helper` || |
3104| | |+------------------------+| |
3105| | ||:diagtext:`helperclass` || |
3106| | |+------------------------+| |
3107| | ||:diagtext:`helps` || |
3108| | |+------------------------+| |
3109| | ||:diagtext:`instancesize`|| |
3110| | |+------------------------+| |
3111| | ||:diagtext:`ownership` || |
3112| | |+------------------------+| |
3113| | ||:diagtext:`performance` || |
3114| | |+------------------------+| |
3115| | ||:diagtext:`security` || |
3116| | |+------------------------+| |
3117| | ||:diagtext:`superclass` || |
3118| | |+------------------------+| |
3119+----------------------------------------+----------------+--------------------------+---------------------------------------------------------------------------------------------+
3120
3121+----------------------------------------+----------------+---------------------------+---------------------------------------------------------------------+-----------------------------------+-------------------------------+
3122|:warning:`warning:` |nbsp| :diagtext:`'`|+--------------+|+-------------------------+|:diagtext:`' command should be used in a comment attached to` |nbsp| |+---------------------------------+| |nbsp| :diagtext:`declaration`|
3123| ||:diagtext:`\\`|||:diagtext:`function` || ||:diagtext:`a function` || |
3124| |+--------------+|+-------------------------+| |+---------------------------------+| |
3125| ||:diagtext:`@` |||:diagtext:`functiongroup`|| ||:diagtext:`a function` || |
3126| |+--------------+|+-------------------------+| |+---------------------------------+| |
3127| | ||:diagtext:`method` || ||:diagtext:`an Objective-C method`|| |
3128| | |+-------------------------+| |+---------------------------------+| |
3129| | ||:diagtext:`methodgroup` || ||:diagtext:`an Objective-C method`|| |
3130| | |+-------------------------+| |+---------------------------------+| |
3131| | ||:diagtext:`callback` || ||:diagtext:`a pointer to function`|| |
3132| | |+-------------------------+| |+---------------------------------+| |
3133+----------------------------------------+----------------+---------------------------+---------------------------------------------------------------------+-----------------------------------+-------------------------------+
3134
3135+-------------------------------------------------------------------------------------------------------+
3136|:warning:`warning:` |nbsp| :diagtext:`HTML start tag prematurely ended, expected attribute name or '>'`|
3137+-------------------------------------------------------------------------------------------------------+
3138
3139+-------------------------------------------------------------------------------+
3140|:warning:`warning:` |nbsp| :diagtext:`expected quoted string after equals sign`|
3141+-------------------------------------------------------------------------------+
3142
3143+-----------------------------------------------------------------------------------------------------+
3144|:warning:`warning:` |nbsp| :diagtext:`parameter '`:placeholder:`A`:diagtext:`' is already documented`|
3145+-----------------------------------------------------------------------------------------------------+
3146
3147+------------------------------------------------------------------------------------------------------------------------------------------+
3148|:warning:`warning:` |nbsp| :diagtext:`unrecognized parameter passing direction, valid directions are '\[in\]', '\[out\]' and '\[in,out\]'`|
3149+------------------------------------------------------------------------------------------------------------------------------------------+
3150
3151+----------------------------------------+----------------+-------------------------------------------------------------------------------------------+
3152|:warning:`warning:` |nbsp| :diagtext:`'`|+--------------+|:diagtext:`param' command used in a comment that is not attached to a function declaration`|
3153| ||:diagtext:`\\`|| |
3154| |+--------------+| |
3155| ||:diagtext:`@` || |
3156| |+--------------+| |
3157+----------------------------------------+----------------+-------------------------------------------------------------------------------------------+
3158
3159+---------------------------------------------------------------------------------------------------------------------+
3160|:warning:`warning:` |nbsp| :diagtext:`parameter '`:placeholder:`A`:diagtext:`' not found in the function declaration`|
3161+---------------------------------------------------------------------------------------------------------------------+
3162
3163+----------------------------------------+----------------+-------------------------------------------------------------------------------------+-------------------------------------+
3164|:warning:`warning:` |nbsp| :diagtext:`'`|+--------------+|:placeholder:`B`:diagtext:`' command used in a comment that is attached to a` |nbsp| |+-----------------------------------+|
3165| ||:diagtext:`\\`|| ||:diagtext:`function returning void`||
3166| |+--------------+| |+-----------------------------------+|
3167| ||:diagtext:`@` || ||:diagtext:`constructor` ||
3168| |+--------------+| |+-----------------------------------+|
3169| | | ||:diagtext:`destructor` ||
3170| | | |+-----------------------------------+|
3171| | | ||:diagtext:`method returning void` ||
3172| | | |+-----------------------------------+|
3173+----------------------------------------+----------------+-------------------------------------------------------------------------------------+-------------------------------------+
3174
3175+----------------------------------------+----------------+----------------------------------------------------------------------------------------------------------------+
3176|:warning:`warning:` |nbsp| :diagtext:`'`|+--------------+|:placeholder:`B`:diagtext:`' command used in a comment that is not attached to a function or method declaration`|
3177| ||:diagtext:`\\`|| |
3178| |+--------------+| |
3179| ||:diagtext:`@` || |
3180| |+--------------+| |
3181+----------------------------------------+----------------+----------------------------------------------------------------------------------------------------------------+
3182
3183+--------------------------------------------------------------------------------------------------------------+
3184|:warning:`warning:` |nbsp| :diagtext:`template parameter '`:placeholder:`A`:diagtext:`' is already documented`|
3185+--------------------------------------------------------------------------------------------------------------+
3186
3187+----------------------------------------+----------------+--------------------------------------------------------------------------------------------+
3188|:warning:`warning:` |nbsp| :diagtext:`'`|+--------------+|:diagtext:`tparam' command used in a comment that is not attached to a template declaration`|
3189| ||:diagtext:`\\`|| |
3190| |+--------------+| |
3191| ||:diagtext:`@` || |
3192| |+--------------+| |
3193+----------------------------------------+----------------+--------------------------------------------------------------------------------------------+
3194
3195+------------------------------------------------------------------------------------------------------------------------------+
3196|:warning:`warning:` |nbsp| :diagtext:`template parameter '`:placeholder:`A`:diagtext:`' not found in the template declaration`|
3197+------------------------------------------------------------------------------------------------------------------------------+
3198
3199+---------------------------------------------------------------------+
3200|:warning:`warning:` |nbsp| :diagtext:`not a Doxygen trailing comment`|
3201+---------------------------------------------------------------------+
3202
3203+----------------------------------------+----------------+------------------------------------------------------------------------------+
3204|:warning:`warning:` |nbsp| :diagtext:`'`|+--------------+|:placeholder:`B`:diagtext:`' command does not terminate a verbatim text block`|
3205| ||:diagtext:`\\`|| |
3206| |+--------------+| |
3207| ||:diagtext:`@` || |
3208| |+--------------+| |
3209+----------------------------------------+----------------+------------------------------------------------------------------------------+
3210
3211
3212-Wdocumentation-deprecated-sync
3213-------------------------------
3214**Diagnostic text:**
3215
3216+----------------------------------------------------------------------------------------------------------------------------------+
3217|:warning:`warning:` |nbsp| :diagtext:`declaration is marked with '\\deprecated' command but does not have a deprecation attribute`|
3218+----------------------------------------------------------------------------------------------------------------------------------+
3219
3220
3221-Wdocumentation-html
3222--------------------
3223**Diagnostic text:**
3224
3225+-----------------------------------------------------------------------------------------------+
3226|:warning:`warning:` |nbsp| :diagtext:`HTML end tag '`:placeholder:`A`:diagtext:`' is forbidden`|
3227+-----------------------------------------------------------------------------------------------+
3228
3229+--------------------------------------------------------------------------------+
3230|:warning:`warning:` |nbsp| :diagtext:`HTML end tag does not match any start tag`|
3231+--------------------------------------------------------------------------------+
3232
3233+--------------------------------------------------------------------------------------------------+
3234|:warning:`warning:` |nbsp| :diagtext:`HTML tag '`:placeholder:`A`:diagtext:`' requires an end tag`|
3235+--------------------------------------------------------------------------------------------------+
3236
3237+-----------------------------------------------------------------------------------------------------------------------------+
3238|:warning:`warning:` |nbsp| :diagtext:`HTML start tag '`:placeholder:`A`:diagtext:`' closed by '`:placeholder:`B`:diagtext:`'`|
3239+-----------------------------------------------------------------------------------------------------------------------------+
3240
3241
3242-Wdocumentation-pedantic
3243------------------------
3244Also controls `-Wdocumentation-unknown-command`_.
3245
3246**Diagnostic text:**
3247
3248+-----------------------------------------------------------------------------------------------+
3249|:warning:`warning:` |nbsp| :diagtext:`whitespace is not allowed in parameter passing direction`|
3250+-----------------------------------------------------------------------------------------------+
3251
3252
3253-Wdocumentation-unknown-command
3254-------------------------------
3255**Diagnostic text:**
3256
3257+--------------------------------------------------------------------------------------------------------------------------------------------+
3258|:warning:`warning:` |nbsp| :diagtext:`unknown command tag name '`:placeholder:`A`:diagtext:`'; did you mean '`:placeholder:`B`:diagtext:`'?`|
3259+--------------------------------------------------------------------------------------------------------------------------------------------+
3260
3261+---------------------------------------------------------------+
3262|:warning:`warning:` |nbsp| :diagtext:`unknown command tag name`|
3263+---------------------------------------------------------------+
3264
3265
3266-Wdollar-in-identifier-extension
3267--------------------------------
3268**Diagnostic text:**
3269
3270+--------------------------------------------------------+
3271|:warning:`warning:` |nbsp| :diagtext:`'$' in identifier`|
3272+--------------------------------------------------------+
3273
3274
3275-Wdouble-promotion
3276------------------
3277**Diagnostic text:**
3278
3279+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3280|:warning:`warning:` |nbsp| :diagtext:`implicit conversion increases floating-point precision:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
3281+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3282
3283
3284-Wduplicate-decl-specifier
3285--------------------------
3286This diagnostic is enabled by default.
3287
3288**Diagnostic text:**
3289
3290+-----------------------------------------------------------------------------------------------------+
3291|:warning:`warning:` |nbsp| :diagtext:`duplicate '`:placeholder:`A`:diagtext:`' declaration specifier`|
3292+-----------------------------------------------------------------------------------------------------+
3293
3294+-----------------------------------------------------------------------------------------------------+
3295|:warning:`warning:` |nbsp| :diagtext:`duplicate '`:placeholder:`A`:diagtext:`' declaration specifier`|
3296+-----------------------------------------------------------------------------------------------------+
3297
3298
3299-Wduplicate-enum
3300----------------
3301**Diagnostic text:**
3302
3303+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3304|:warning:`warning:` |nbsp| :diagtext:`element` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has been implicitly assigned` |nbsp| :placeholder:`B` |nbsp| :diagtext:`which another element has been assigned`|
3305+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3306
3307
3308-Wduplicate-method-arg
3309----------------------
3310**Diagnostic text:**
3311
3312+------------------------------------------------------------------------------------------------+
3313|:warning:`warning:` |nbsp| :diagtext:`redeclaration of method parameter` |nbsp| :placeholder:`A`|
3314+------------------------------------------------------------------------------------------------+
3315
3316
3317-Wduplicate-method-match
3318------------------------
3319**Diagnostic text:**
3320
3321+-----------------------------------------------------------------------------------------------------------------------------------+
3322|:warning:`warning:` |nbsp| :diagtext:`multiple declarations of method` |nbsp| :placeholder:`A` |nbsp| :diagtext:`found and ignored`|
3323+-----------------------------------------------------------------------------------------------------------------------------------+
3324
3325
Richard Smithcf9f4222017-01-20 19:27:09 +00003326-Wduplicate-protocol
3327--------------------
3328This diagnostic is enabled by default.
3329
3330**Diagnostic text:**
3331
3332+-----------------------------------------------------------------------------------------------------------------------------+
3333|:warning:`warning:` |nbsp| :diagtext:`duplicate protocol definition of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is ignored`|
3334+-----------------------------------------------------------------------------------------------------------------------------+
3335
3336
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003337-Wdynamic-class-memaccess
3338-------------------------
3339This diagnostic is enabled by default.
3340
3341**Diagnostic text:**
3342
3343+---------------------------+-------------------------------+------------------------------------------------------------------------------------------------+----------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+
3344|:warning:`warning:` |nbsp| |+-----------------------------+| |nbsp| :diagtext:`this` |nbsp| :placeholder:`B` |nbsp| :diagtext:`call is a pointer to` |nbsp| |+--------------------------------------+|:diagtext:`dynamic class` |nbsp| :placeholder:`D`:diagtext:`; vtable pointer will be` |nbsp| |+-----------------------+|
3345| ||:diagtext:`destination for` || || || ||:diagtext:`overwritten`||
3346| |+-----------------------------+| |+--------------------------------------+| |+-----------------------+|
3347| ||:diagtext:`source of` || ||:diagtext:`class containing a` |nbsp| || ||:diagtext:`copied` ||
3348| |+-----------------------------+| |+--------------------------------------+| |+-----------------------+|
3349| ||:diagtext:`first operand of` || | | ||:diagtext:`moved` ||
3350| |+-----------------------------+| | | |+-----------------------+|
3351| ||:diagtext:`second operand of`|| | | ||:diagtext:`compared` ||
3352| |+-----------------------------+| | | |+-----------------------+|
3353+---------------------------+-------------------------------+------------------------------------------------------------------------------------------------+----------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+
3354
3355
Richard Smithcf9f4222017-01-20 19:27:09 +00003356-Wdynamic-exception-spec
3357------------------------
3358Some of the diagnostics controlled by this flag are enabled by default.
3359
3360Also controls `-Wdeprecated-dynamic-exception-spec`_.
3361
3362**Diagnostic text:**
3363
3364+--------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00003365|:error:`error:` |nbsp| :diagtext:`ISO C++17 does not allow dynamic exception specifications`|
Richard Smithcf9f4222017-01-20 19:27:09 +00003366+--------------------------------------------------------------------------------------------+
3367
3368
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003369-Weffc++
3370--------
Richard Smithce9d5862016-09-14 01:51:10 +00003371Synonym for `-Wnon-virtual-dtor`_.
3372
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003373
3374-Wembedded-directive
3375--------------------
3376**Diagnostic text:**
3377
3378+----------------------------------------------------------------------------------------------------------+
3379|:warning:`warning:` |nbsp| :diagtext:`embedding a directive within macro arguments has undefined behavior`|
3380+----------------------------------------------------------------------------------------------------------+
3381
3382
3383-Wempty-body
3384------------
3385This diagnostic is enabled by default.
3386
3387**Diagnostic text:**
3388
3389+--------------------------------------------------------------+
3390|:warning:`warning:` |nbsp| :diagtext:`for loop has empty body`|
3391+--------------------------------------------------------------+
3392
3393+------------------------------------------------------------------+
3394|:warning:`warning:` |nbsp| :diagtext:`if statement has empty body`|
3395+------------------------------------------------------------------+
3396
3397+--------------------------------------------------------------------------+
3398|:warning:`warning:` |nbsp| :diagtext:`range-based for loop has empty body`|
3399+--------------------------------------------------------------------------+
3400
3401+----------------------------------------------------------------------+
3402|:warning:`warning:` |nbsp| :diagtext:`switch statement has empty body`|
3403+----------------------------------------------------------------------+
3404
3405+----------------------------------------------------------------+
3406|:warning:`warning:` |nbsp| :diagtext:`while loop has empty body`|
3407+----------------------------------------------------------------+
3408
3409
3410-Wempty-decomposition
3411---------------------
3412This diagnostic is enabled by default.
3413
3414**Diagnostic text:**
3415
3416+-------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00003417|:warning:`warning:` |nbsp| :diagtext:`ISO C++17 does not allow a decomposition group to be empty`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003418+-------------------------------------------------------------------------------------------------+
3419
3420
3421-Wempty-translation-unit
3422------------------------
3423**Diagnostic text:**
3424
3425+------------------------------------------------------------------------------------------------------------+
3426|:warning:`warning:` |nbsp| :diagtext:`ISO C requires a translation unit to contain at least one declaration`|
3427+------------------------------------------------------------------------------------------------------------+
3428
3429
3430-Wencode-type
3431-------------
3432This diagnostic is enabled by default.
3433
3434**Diagnostic text:**
3435
3436+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3437|:warning:`warning:` |nbsp| :diagtext:`encoding of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`type is incomplete because` |nbsp| :placeholder:`B` |nbsp| :diagtext:`component has unknown encoding`|
3438+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3439
3440
3441-Wendif-labels
3442--------------
3443Synonym for `-Wextra-tokens`_.
3444
3445
3446-Wenum-compare
3447--------------
3448This diagnostic is enabled by default.
3449
Richard Smith66310362017-10-26 21:06:52 +00003450Also controls `-Wenum-compare-switch`_.
3451
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003452**Diagnostic text:**
3453
3454+------------------------------------------------------------------------------------------------+
3455|:warning:`warning:` |nbsp| :diagtext:`comparison of two values with different enumeration types`|
3456+------------------------------------------------------------------------------------------------+
3457
3458
Richard Smith66310362017-10-26 21:06:52 +00003459-Wenum-compare-switch
3460---------------------
3461This diagnostic is enabled by default.
3462
3463**Diagnostic text:**
3464
3465+--------------------------------------------------------------------------------------------------------------------+
3466|:warning:`warning:` |nbsp| :diagtext:`comparison of two values with different enumeration types in switch statement`|
3467+--------------------------------------------------------------------------------------------------------------------+
3468
3469
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003470-Wenum-conversion
3471-----------------
3472This diagnostic is enabled by default.
3473
3474**Diagnostic text:**
3475
3476+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3477|:warning:`warning:` |nbsp| :diagtext:`implicit conversion from enumeration type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to different enumeration type` |nbsp| :placeholder:`B`|
3478+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3479
3480
3481-Wenum-too-large
3482----------------
3483This diagnostic is enabled by default.
3484
3485**Diagnostic text:**
3486
3487+-----------------------------------------------------------------------------------------+
3488|:warning:`warning:` |nbsp| :diagtext:`enumeration values exceed range of largest integer`|
3489+-----------------------------------------------------------------------------------------+
3490
3491+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
3492|:warning:`warning:` |nbsp| :diagtext:`incremented enumerator value` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not representable in the largest integer type`|
3493+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
3494
3495
3496-Wexceptions
3497------------
3498This diagnostic is enabled by default.
3499
3500**Diagnostic text:**
3501
3502+--------------------------------------------------------------------------------------------------------+-------------------------+--------------------------------------+
3503|:warning:`warning:` |nbsp| :diagtext:`cannot refer to a non-static member from the handler of a` |nbsp| |+-----------------------+| |nbsp| :diagtext:`function try block`|
3504| ||:diagtext:`constructor`|| |
3505| |+-----------------------+| |
3506| ||:diagtext:`destructor` || |
3507| |+-----------------------+| |
3508+--------------------------------------------------------------------------------------------------------+-------------------------+--------------------------------------+
3509
3510+-------------------------------------------------------------------------------------------------------------------------------------+
3511|:warning:`warning:` |nbsp| :diagtext:`exception of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`will be caught by earlier handler`|
3512+-------------------------------------------------------------------------------------------------------------------------------------+
3513
Richard Smith66310362017-10-26 21:06:52 +00003514+-----------------------------------------------------------------------------------------------------------------------------+
3515|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has a non-throwing exception specification but can still throw`|
3516+-----------------------------------------------------------------------------------------------------------------------------+
3517
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003518
3519-Wexit-time-destructors
3520-----------------------
3521**Diagnostic text:**
3522
3523+-----------------------------------------------------------------------------------+
3524|:warning:`warning:` |nbsp| :diagtext:`declaration requires an exit-time destructor`|
3525+-----------------------------------------------------------------------------------+
3526
3527
3528-Wexpansion-to-defined
3529----------------------
3530Some of the diagnostics controlled by this flag are enabled by default.
3531
3532**Diagnostic text:**
3533
3534+-------------------------------------------------------------------------------------------------+
3535|:warning:`warning:` |nbsp| :diagtext:`macro expansion producing 'defined' has undefined behavior`|
3536+-------------------------------------------------------------------------------------------------+
3537
3538+-------------------------------------------------------------------------------------------------+
3539|:warning:`warning:` |nbsp| :diagtext:`macro expansion producing 'defined' has undefined behavior`|
3540+-------------------------------------------------------------------------------------------------+
3541
3542
3543-Wexplicit-initialize-call
3544--------------------------
3545This diagnostic is enabled by default.
3546
3547**Diagnostic text:**
3548
3549+------------------------------------------------------------------------------------------------------------+
3550|:warning:`warning:` |nbsp| :diagtext:`explicit call to +initialize results in duplicate call to +initialize`|
3551+------------------------------------------------------------------------------------------------------------+
3552
3553+----------------------------------------------------------------------------------------------------------------------------+
3554|:warning:`warning:` |nbsp| :diagtext:`explicit call to \[super initialize\] should only be in implementation of +initialize`|
3555+----------------------------------------------------------------------------------------------------------------------------+
3556
3557
3558-Wexplicit-ownership-type
3559-------------------------
3560**Diagnostic text:**
3561
3562+-------------------------------------------------------------------------------------------------------------------------------------+
3563|:warning:`warning:` |nbsp| :diagtext:`method parameter of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`with no explicit ownership`|
3564+-------------------------------------------------------------------------------------------------------------------------------------+
3565
3566
3567-Wextended-offsetof
3568-------------------
3569**Diagnostic text:**
3570
3571+--------------------------------------------------------------------------------------+
3572|:warning:`warning:` |nbsp| :diagtext:`using extended field designator is an extension`|
3573+--------------------------------------------------------------------------------------+
3574
3575
3576-Wextern-c-compat
3577-----------------
3578This diagnostic is enabled by default.
3579
3580**Diagnostic text:**
3581
3582+---------------------------+---------------------------+--------------------+--------------------------------------------+---------------------------+--------------------------+
3583|:warning:`warning:` |nbsp| |+-------------------------+|+------------------+| |nbsp| :diagtext:`has size 0 in C,` |nbsp| |+-------------------------+| |nbsp| :diagtext:`in C++`|
3584| || |||:diagtext:`struct`|| ||:diagtext:`size 1` || |
3585| |+-------------------------+|+------------------+| |+-------------------------+| |
3586| ||:diagtext:`empty` |nbsp| |||:diagtext:`union` || ||:diagtext:`non-zero size`|| |
3587| |+-------------------------+|+------------------+| |+-------------------------+| |
3588+---------------------------+---------------------------+--------------------+--------------------------------------------+---------------------------+--------------------------+
3589
3590
3591-Wextern-initializer
3592--------------------
3593This diagnostic is enabled by default.
3594
3595**Diagnostic text:**
3596
3597+---------------------------------------------------------------------------+
3598|:warning:`warning:` |nbsp| :diagtext:`'extern' variable has an initializer`|
3599+---------------------------------------------------------------------------+
3600
3601
3602-Wextra
3603-------
3604Some of the diagnostics controlled by this flag are enabled by default.
3605
Richard Smith66310362017-10-26 21:06:52 +00003606Also controls `-Wignored-qualifiers`_, `-Winitializer-overrides`_, `-Wmissing-field-initializers`_, `-Wmissing-method-return-type`_, `-Wnull-pointer-arithmetic`_, `-Wsemicolon-before-method-body`_, `-Wsign-compare`_, `-Wunused-parameter`_.
Richard Smithcf9f4222017-01-20 19:27:09 +00003607
3608**Diagnostic text:**
3609
3610+-----------------------------------------------------------------------------------------------------------------------------+
3611|:warning:`warning:` |nbsp| :diagtext:`call to function without interrupt attribute could clobber interruptee's VFP registers`|
3612+-----------------------------------------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003613
3614
3615-Wextra-qualification
3616---------------------
3617This diagnostic is enabled by default.
3618
3619**Diagnostic text:**
3620
3621+--------------------------------------------------------------------------------------------+
3622|:warning:`warning:` |nbsp| :diagtext:`extra qualification on member` |nbsp| :placeholder:`A`|
3623+--------------------------------------------------------------------------------------------+
3624
3625
3626-Wextra-semi
3627------------
3628Also controls `-Wc++11-extra-semi`_.
3629
3630**Diagnostic text:**
3631
3632+--------------------------------------------------------+------------------------------------------------+
3633|:warning:`warning:` |nbsp| :diagtext:`extra ';'` |nbsp| |+----------------------------------------------+|
3634| ||:diagtext:`outside of a function` ||
3635| |+----------------------------------------------+|
3636| ||+--------------------------------------------+||
3637| |||:diagtext:`inside a` |nbsp| :placeholder:`B`|||
3638| ||+--------------------------------------------+||
3639| |+----------------------------------------------+|
3640| ||:diagtext:`inside instance variable list` ||
3641| |+----------------------------------------------+|
3642| ||:diagtext:`after member function definition` ||
3643| |+----------------------------------------------+|
3644+--------------------------------------------------------+------------------------------------------------+
3645
3646+---------------------------------------------------------------------------------+
3647|:warning:`warning:` |nbsp| :diagtext:`extra ';' after member function definition`|
3648+---------------------------------------------------------------------------------+
3649
3650
3651-Wextra-tokens
3652--------------
3653This diagnostic is enabled by default.
3654
3655**Diagnostic text:**
3656
3657+------------------------------------------------------------------------------------------------------------+
3658|:warning:`warning:` |nbsp| :diagtext:`extra tokens at end of #`:placeholder:`A` |nbsp| :diagtext:`directive`|
3659+------------------------------------------------------------------------------------------------------------+
3660
3661+-------------------------------------------------------------------------------------------------------------------------------+
3662|:warning:`warning:` |nbsp| :diagtext:`extra tokens at the end of '#pragma omp` |nbsp| :placeholder:`A`:diagtext:`' are ignored`|
3663+-------------------------------------------------------------------------------------------------------------------------------+
3664
3665
3666-Wfallback
3667----------
3668This diagnostic is enabled by default.
3669
3670**Diagnostic text:**
3671
3672+------------------------------------------------------------------------------+
3673|:warning:`warning:` |nbsp| :diagtext:`falling back to` |nbsp| :placeholder:`A`|
3674+------------------------------------------------------------------------------+
3675
3676
3677-Wflag-enum
3678-----------
3679This diagnostic is enabled by default.
3680
3681**Diagnostic text:**
3682
3683+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3684|:warning:`warning:` |nbsp| :diagtext:`enumeration value` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is out of range of flags in enumeration type` |nbsp| :placeholder:`B`|
3685+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3686
3687
3688-Wflexible-array-extensions
3689---------------------------
3690**Diagnostic text:**
3691
3692+-------------------------------------------------------------------------------------------------------------------------------+
3693|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`may not be used as an array element due to flexible array member`|
3694+-------------------------------------------------------------------------------------------------------------------------------+
3695
3696+-------------------------------------------------------------------------------------------------------------------------+
3697|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`may not be nested in a struct due to flexible array member`|
3698+-------------------------------------------------------------------------------------------------------------------------+
3699
3700
3701-Wfloat-conversion
3702------------------
3703Also controls `-Wfloat-overflow-conversion`_, `-Wfloat-zero-conversion`_.
3704
3705**Diagnostic text:**
3706
3707+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3708|:warning:`warning:` |nbsp| :diagtext:`implicit conversion turns floating-point number into integer:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
3709+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3710
3711
3712-Wfloat-equal
3713-------------
3714**Diagnostic text:**
3715
3716+---------------------------------------------------------------------------------------+
3717|:warning:`warning:` |nbsp| :diagtext:`comparing floating point with == or != is unsafe`|
3718+---------------------------------------------------------------------------------------+
3719
3720
3721-Wfloat-overflow-conversion
3722---------------------------
3723**Diagnostic text:**
3724
3725+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3726|:warning:`warning:` |nbsp| :diagtext:`implicit conversion of out of range value from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`changes value from` |nbsp| :placeholder:`C` |nbsp| :diagtext:`to` |nbsp| :placeholder:`D`|
3727+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3728
3729
3730-Wfloat-zero-conversion
3731-----------------------
3732**Diagnostic text:**
3733
3734+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3735|:warning:`warning:` |nbsp| :diagtext:`implicit conversion from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`changes non-zero value from` |nbsp| :placeholder:`C` |nbsp| :diagtext:`to` |nbsp| :placeholder:`D`|
3736+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3737
3738
3739-Wfor-loop-analysis
3740-------------------
3741**Diagnostic text:**
3742
3743+-----------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------------------------+
3744|:warning:`warning:` |nbsp| :diagtext:`variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is` |nbsp| |+-----------------------+| |nbsp| :diagtext:`both in the loop header and in the loop body`|
3745| ||:diagtext:`decremented`|| |
3746| |+-----------------------+| |
3747| ||:diagtext:`incremented`|| |
3748| |+-----------------------+| |
3749+-----------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------------------------+
3750
3751+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------+
3752|:warning:`warning:` |nbsp| :diagtext:`variable`|+----------------------------------------------------------------------------------------------------------------------------------------------------------+| |nbsp| :diagtext:`used in loop condition not modified in loop body`|
3753| ||:diagtext:`s` || |
3754| |+----------------------------------------------------------------------------------------------------------------------------------------------------------+| |
3755| ||+------------------------+ || |
3756| ||| |nbsp| :placeholder:`B`| || |
3757| ||+------------------------+ || |
3758| |+----------------------------------------------------------------------------------------------------------------------------------------------------------+| |
3759| ||+------------------------------------------------------------------------------------+ || |
3760| |||:diagtext:`s` |nbsp| :placeholder:`B` |nbsp| :diagtext:`and` |nbsp| :placeholder:`C`| || |
3761| ||+------------------------------------------------------------------------------------+ || |
3762| |+----------------------------------------------------------------------------------------------------------------------------------------------------------+| |
3763| ||+-------------------------------------------------------------------------------------------------------------------+ || |
3764| |||:diagtext:`s` |nbsp| :placeholder:`B`:diagtext:`,` |nbsp| :placeholder:`C`:diagtext:`, and` |nbsp| :placeholder:`D`| || |
3765| ||+-------------------------------------------------------------------------------------------------------------------+ || |
3766| |+----------------------------------------------------------------------------------------------------------------------------------------------------------+| |
3767| ||+--------------------------------------------------------------------------------------------------------------------------------------------------------+|| |
3768| |||:diagtext:`s` |nbsp| :placeholder:`B`:diagtext:`,` |nbsp| :placeholder:`C`:diagtext:`,` |nbsp| :placeholder:`D`:diagtext:`, and` |nbsp| :placeholder:`E`||| |
3769| ||+--------------------------------------------------------------------------------------------------------------------------------------------------------+|| |
3770| |+----------------------------------------------------------------------------------------------------------------------------------------------------------+| |
3771+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------+
3772
3773
3774-Wformat
3775--------
3776This diagnostic is enabled by default.
3777
Richard Smith8cba2912016-09-14 01:55:42 +00003778Also controls `-Wformat-extra-args`_, `-Wformat-invalid-specifier`_, `-Wformat-security`_, `-Wformat-y2k`_, `-Wformat-zero-length`_, `-Wnonnull`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003779
3780**Diagnostic text:**
3781
Richard Smithcf9f4222017-01-20 19:27:09 +00003782+-------------------------------------------------------------------------------------+
3783|:warning:`warning:` |nbsp| :diagtext:`using '%%P' format specifier without precision`|
3784+-------------------------------------------------------------------------------------+
3785
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003786+---------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3787|:warning:`warning:` |nbsp| |+--------------------------------------------+| |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' should not be used as format arguments; add an explicit cast to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`instead`|
3788| ||:diagtext:`values of type` || |
3789| |+--------------------------------------------+| |
3790| ||:diagtext:`enum values with underlying type`|| |
3791| |+--------------------------------------------+| |
3792+---------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3793
3794+------------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------+
3795|:warning:`warning:` |nbsp| :diagtext:`format specifies type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`but the argument has` |nbsp| |+---------------------------+| |nbsp| :placeholder:`B`|
3796| ||:diagtext:`type` || |
3797| |+---------------------------+| |
3798| ||:diagtext:`underlying type`|| |
3799| |+---------------------------+| |
3800+------------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------+
3801
Richard Smithcf9f4222017-01-20 19:27:09 +00003802+----------------------------------------------------------------------------------------------------------------------------------------+
3803|:warning:`warning:` |nbsp| :diagtext:`using '`:placeholder:`A`:diagtext:`' format specifier annotation outside of os\_log()/os\_trace()`|
3804+----------------------------------------------------------------------------------------------------------------------------------------+
3805
Richard Smithb6a3b4b2016-09-12 05:58:29 +00003806+-----------------------------------------------------------------------------+-----------------------------+
3807|:warning:`warning:` |nbsp| :diagtext:`invalid position specified for` |nbsp| |+---------------------------+|
3808| ||:diagtext:`field width` ||
3809| |+---------------------------+|
3810| ||:diagtext:`field precision`||
3811| |+---------------------------+|
3812+-----------------------------------------------------------------------------+-----------------------------+
3813
3814+----------------------------------------------------------------------------------------------------------+
3815|:warning:`warning:` |nbsp| :diagtext:`cannot mix positional and non-positional arguments in format string`|
3816+----------------------------------------------------------------------------------------------------------+
3817
3818+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3819|:warning:`warning:` |nbsp| :diagtext:`length modifier '`:placeholder:`A`:diagtext:`' results in undefined behavior or no effect with '`:placeholder:`B`:diagtext:`' conversion specifier`|
3820+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3821
3822+--------------------------------------------------------------------------------+
3823|:warning:`warning:` |nbsp| :diagtext:`format string should not be a wide string`|
3824+--------------------------------------------------------------------------------+
3825
3826+-------------------------------------------------------------------------------------------------------+
3827|:warning:`warning:` |nbsp| :diagtext:`position arguments in format strings start counting at 1 (not 0)`|
3828+-------------------------------------------------------------------------------------------------------+
3829
3830+------------------------------------------------------------+
3831|:warning:`warning:` |nbsp| :diagtext:`format string missing`|
3832+------------------------------------------------------------+
3833
3834+----------------------------------------------------------------------------------------------------------------------------------+
3835|:warning:`warning:` |nbsp| :diagtext:`object format flags cannot be used with '`:placeholder:`A`:diagtext:`' conversion specifier`|
3836+----------------------------------------------------------------------------------------------------------------------------------+
3837
3838+----------------------------------------+-----------------+-------------------------------------+-----------------------+--------------------------------------------------------+
3839|:warning:`warning:` |nbsp| :diagtext:`'`|+---------------+|:diagtext:`' specified field` |nbsp| |+---------------------+| |nbsp| :diagtext:`is missing a matching 'int' argument`|
3840| ||:diagtext:`\*` || ||:diagtext:`width` || |
3841| |+---------------+| |+---------------------+| |
3842| ||:diagtext:`.\*`|| ||:diagtext:`precision`|| |
3843| |+---------------+| |+---------------------+| |
3844+----------------------------------------+-----------------+-------------------------------------+-----------------------+--------------------------------------------------------+
3845
3846+----------------------------------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+
3847|:warning:`warning:` |nbsp| :diagtext:`field` |nbsp| |+---------------------+| |nbsp| :diagtext:`should have type` |nbsp| :placeholder:`B`:diagtext:`, but argument has type` |nbsp| :placeholder:`C`|
3848| ||:diagtext:`width` || |
3849| |+---------------------+| |
3850| ||:diagtext:`precision`|| |
3851| |+---------------------+| |
3852+----------------------------------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+
3853
3854+-----------------------------------------------------------------+
3855|:warning:`warning:` |nbsp| :diagtext:`missing object format flag`|
3856+-----------------------------------------------------------------+
3857
3858+------------------------------------------------------------------------------------------+
3859|:warning:`warning:` |nbsp| :diagtext:`format string contains '\\0' within the string body`|
3860+------------------------------------------------------------------------------------------+
3861
3862+---------------------------------------------------------------------------+
3863|:warning:`warning:` |nbsp| :diagtext:`format string is not null-terminated`|
3864+---------------------------------------------------------------------------+
3865
3866+-----------------------------------------------------------------------------------------------------------------------------------------+
3867|:warning:`warning:` |nbsp| :diagtext:`flag '`:placeholder:`A`:diagtext:`' is ignored when flag '`:placeholder:`B`:diagtext:`' is present`|
3868+-----------------------------------------------------------------------------------------------------------------------------------------+
3869
3870+------------------------------------------------------------------+
3871|:warning:`warning:` |nbsp| :diagtext:`incomplete format specifier`|
3872+------------------------------------------------------------------+
3873
3874+--------------------------------------------------------------------------------+
3875|:warning:`warning:` |nbsp| :diagtext:`more '%%' conversions than data arguments`|
3876+--------------------------------------------------------------------------------+
3877
3878+-------------------------------------------------------------------------------------------------------+
3879|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' is not a valid object format flag`|
3880+-------------------------------------------------------------------------------------------------------+
3881
3882+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
3883|:warning:`warning:` |nbsp| :diagtext:`flag '`:placeholder:`A`:diagtext:`' results in undefined behavior with '`:placeholder:`B`:diagtext:`' conversion specifier`|
3884+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
3885
3886+---------------------------+-------------------------+------------------------------------------------------------------------------------------------------------------+
3887|:warning:`warning:` |nbsp| |+-----------------------+| |nbsp| :diagtext:`used with '`:placeholder:`B`:diagtext:`' conversion specifier, resulting in undefined behavior`|
3888| ||:diagtext:`field width`|| |
3889| |+-----------------------+| |
3890| ||:diagtext:`precision` || |
3891| |+-----------------------+| |
3892+---------------------------+-------------------------+------------------------------------------------------------------------------------------------------------------+
3893
3894+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
3895|:warning:`warning:` |nbsp| :diagtext:`data argument position '`:placeholder:`A`:diagtext:`' exceeds the number of data arguments (`:placeholder:`B`:diagtext:`)`|
3896+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
3897
3898+----------------------------------------------------------------------------------------+
3899|:warning:`warning:` |nbsp| :diagtext:`zero field width in scanf format string is unused`|
3900+----------------------------------------------------------------------------------------+
3901
3902+----------------------------------------------------------------------------------------+
3903|:warning:`warning:` |nbsp| :diagtext:`no closing '\]' for '%%\[' in scanf format string`|
3904+----------------------------------------------------------------------------------------+
3905
3906
3907-Wformat-extra-args
3908-------------------
3909This diagnostic is enabled by default.
3910
3911**Diagnostic text:**
3912
3913+------------------------------------------------------------------------------+
3914|:warning:`warning:` |nbsp| :diagtext:`data argument not used by format string`|
3915+------------------------------------------------------------------------------+
3916
3917
3918-Wformat-invalid-specifier
3919--------------------------
3920This diagnostic is enabled by default.
3921
3922**Diagnostic text:**
3923
3924+--------------------------------------------------------------------------------------------------+
3925|:warning:`warning:` |nbsp| :diagtext:`invalid conversion specifier '`:placeholder:`A`:diagtext:`'`|
3926+--------------------------------------------------------------------------------------------------+
3927
3928
3929-Wformat-non-iso
3930----------------
3931**Diagnostic text:**
3932
3933+-----------------------------------------------------------------------------+----------------------------------+---------------------------------------------+
3934|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`'` |nbsp| |+--------------------------------+| |nbsp| :diagtext:`is not supported by ISO C`|
3935| ||:diagtext:`length modifier` || |
3936| |+--------------------------------+| |
3937| ||:diagtext:`conversion specifier`|| |
3938| |+--------------------------------+| |
3939+-----------------------------------------------------------------------------+----------------------------------+---------------------------------------------+
3940
3941+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3942|:warning:`warning:` |nbsp| :diagtext:`using length modifier '`:placeholder:`A`:diagtext:`' with conversion specifier '`:placeholder:`B`:diagtext:`' is not supported by ISO C`|
3943+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3944
3945+--------------------------------------------------------------------------------------+
3946|:warning:`warning:` |nbsp| :diagtext:`positional arguments are not supported by ISO C`|
3947+--------------------------------------------------------------------------------------+
3948
3949
3950-Wformat-nonliteral
3951-------------------
3952**Diagnostic text:**
3953
3954+----------------------------------------------------------------------------+
3955|:warning:`warning:` |nbsp| :diagtext:`format string is not a string literal`|
3956+----------------------------------------------------------------------------+
3957
3958
3959-Wformat-pedantic
3960-----------------
3961**Diagnostic text:**
3962
3963+------------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------+
3964|:warning:`warning:` |nbsp| :diagtext:`format specifies type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`but the argument has` |nbsp| |+---------------------------+| |nbsp| :placeholder:`B`|
3965| ||:diagtext:`type` || |
3966| |+---------------------------+| |
3967| ||:diagtext:`underlying type`|| |
3968| |+---------------------------+| |
3969+------------------------------------------------------------------------------------------------------------------------------------+-----------------------------+------------------------+
3970
3971
3972-Wformat-security
3973-----------------
3974This diagnostic is enabled by default.
3975
3976**Diagnostic text:**
3977
3978+---------------------------------------------------------------------------------------------------+
3979|:warning:`warning:` |nbsp| :diagtext:`format string is not a string literal (potentially insecure)`|
3980+---------------------------------------------------------------------------------------------------+
3981
3982
3983-Wformat-y2k
3984------------
3985This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
3986
3987-Wformat-zero-length
3988--------------------
3989This diagnostic is enabled by default.
3990
3991**Diagnostic text:**
3992
3993+-------------------------------------------------------------+
3994|:warning:`warning:` |nbsp| :diagtext:`format string is empty`|
3995+-------------------------------------------------------------+
3996
3997
3998-Wformat=2
3999----------
4000Some of the diagnostics controlled by this flag are enabled by default.
4001
4002Controls `-Wformat-nonliteral`_, `-Wformat-security`_, `-Wformat-y2k`_.
4003
4004
4005-Wfour-char-constants
4006---------------------
4007**Diagnostic text:**
4008
4009+-------------------------------------------------------------------------+
4010|:warning:`warning:` |nbsp| :diagtext:`multi-character character constant`|
4011+-------------------------------------------------------------------------+
4012
4013
4014-Wframe-larger-than=
4015--------------------
4016This diagnostic is enabled by default.
4017
4018**Diagnostic text:**
4019
4020The text of this diagnostic is not controlled by Clang.
4021
4022+--------------------------------------------------------------------------------------------------------------------------------------+
4023|:warning:`warning:` |nbsp| :diagtext:`stack frame size of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`bytes in` |nbsp| :placeholder:`B`|
4024+--------------------------------------------------------------------------------------------------------------------------------------+
4025
4026
4027-Wfunction-def-in-objc-container
4028--------------------------------
4029This diagnostic is enabled by default.
4030
4031**Diagnostic text:**
4032
4033+--------------------------------------------------------------------------------------------------------+
4034|:warning:`warning:` |nbsp| :diagtext:`function definition inside an Objective-C container is deprecated`|
4035+--------------------------------------------------------------------------------------------------------+
4036
4037
4038-Wfuture-compat
4039---------------
4040This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
4041
4042-Wgcc-compat
4043------------
4044Some of the diagnostics controlled by this flag are enabled by default.
4045
4046**Diagnostic text:**
4047
Richard Smithcf9f4222017-01-20 19:27:09 +00004048+--------------------------------------------------------------------------+
4049|:warning:`warning:` |nbsp| :diagtext:`'diagnose\_if' is a clang extension`|
4050+--------------------------------------------------------------------------+
4051
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004052+------------------------------------------------------------------------+
4053|:warning:`warning:` |nbsp| :diagtext:`'enable\_if' is a clang extension`|
4054+------------------------------------------------------------------------+
4055
4056+-----------------------------------------------------------------------------------------------+
4057|:warning:`warning:` |nbsp| :diagtext:`\_\_final is a GNU extension, consider using C++11 final`|
4058+-----------------------------------------------------------------------------------------------+
4059
4060+--------------------------------------------------------------------------------------------------------------------------------------------------------+
4061|:warning:`warning:` |nbsp| :diagtext:`GCC does not allow` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute in this position on a function definition`|
4062+--------------------------------------------------------------------------------------------------------------------------------------------------------+
4063
4064+---------------------------------------------------------------------------------------+
4065|:warning:`warning:` |nbsp| :diagtext:`'break' is bound to loop, GCC binds it to switch`|
4066+---------------------------------------------------------------------------------------+
4067
4068+----------------------------------------------------------------------------------------------------------------------------------------+
4069|:warning:`warning:` |nbsp| :diagtext:`GCC does not allow the 'cleanup' attribute argument to be anything other than a simple identifier`|
4070+----------------------------------------------------------------------------------------------------------------------------------------+
4071
4072+-----------------------------------------------------------------------------------------------------------------+
4073|:warning:`warning:` |nbsp| :diagtext:`GCC does not allow an attribute in this position on a function declaration`|
4074+-----------------------------------------------------------------------------------------------------------------+
4075
4076+----------------------------------------------------------------------------------------------------------------------------------+
4077|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' is bound to current loop, GCC binds it to the enclosing loop`|
4078+----------------------------------------------------------------------------------------------------------------------------------+
4079
4080
4081-Wglobal-constructors
4082---------------------
4083**Diagnostic text:**
4084
4085+--------------------------------------------------------------------------------+
4086|:warning:`warning:` |nbsp| :diagtext:`declaration requires a global constructor`|
4087+--------------------------------------------------------------------------------+
4088
4089+-------------------------------------------------------------------------------+
4090|:warning:`warning:` |nbsp| :diagtext:`declaration requires a global destructor`|
4091+-------------------------------------------------------------------------------+
4092
4093
4094-Wgnu
4095-----
4096Some of the diagnostics controlled by this flag are enabled by default.
4097
Richard Smith8cba2912016-09-14 01:55:42 +00004098Controls `-Wgnu-alignof-expression`_, `-Wgnu-anonymous-struct`_, `-Wgnu-auto-type`_, `-Wgnu-binary-literal`_, `-Wgnu-case-range`_, `-Wgnu-complex-integer`_, `-Wgnu-compound-literal-initializer`_, `-Wgnu-conditional-omitted-operand`_, `-Wgnu-designator`_, `-Wgnu-empty-initializer`_, `-Wgnu-empty-struct`_, `-Wgnu-flexible-array-initializer`_, `-Wgnu-flexible-array-union-member`_, `-Wgnu-folding-constant`_, `-Wgnu-imaginary-constant`_, `-Wgnu-include-next`_, `-Wgnu-label-as-value`_, `-Wgnu-redeclared-enum`_, `-Wgnu-statement-expression`_, `-Wgnu-static-float-init`_, `-Wgnu-string-literal-operator-template`_, `-Wgnu-union-cast`_, `-Wgnu-variable-sized-type-not-at-end`_, `-Wgnu-zero-line-directive`_, `-Wgnu-zero-variadic-macro-arguments`_, `-Wredeclared-class-member`_, `-Wvla-extension`_, `-Wzero-length-array`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004099
4100
4101-Wgnu-alignof-expression
4102------------------------
4103This diagnostic is enabled by default.
4104
4105**Diagnostic text:**
4106
4107+----------------------------------------------------------------------------------------------------------+
4108|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`applied to an expression is a GNU extension`|
4109+----------------------------------------------------------------------------------------------------------+
4110
4111
4112-Wgnu-anonymous-struct
4113----------------------
4114**Diagnostic text:**
4115
4116+----------------------------------------------------------------------------+
4117|:warning:`warning:` |nbsp| :diagtext:`anonymous structs are a GNU extension`|
4118+----------------------------------------------------------------------------+
4119
4120
4121-Wgnu-array-member-paren-init
4122-----------------------------
4123This diagnostic is an error by default, but the flag ``-Wno-gnu-array-member-paren-init`` can be used to disable the error.
4124
4125**Diagnostic text:**
4126
4127+----------------------------------------------------------------------------------------------------+
4128|:error:`error:` |nbsp| :diagtext:`parenthesized initialization of a member array is a GNU extension`|
4129+----------------------------------------------------------------------------------------------------+
4130
4131
4132-Wgnu-auto-type
4133---------------
4134**Diagnostic text:**
4135
4136+--------------------------------------------------------------------------+
4137|:warning:`warning:` |nbsp| :diagtext:`'\_\_auto\_type' is a GNU extension`|
4138+--------------------------------------------------------------------------+
4139
4140
4141-Wgnu-binary-literal
4142--------------------
4143**Diagnostic text:**
4144
4145+----------------------------------------------------------------------------------+
4146|:warning:`warning:` |nbsp| :diagtext:`binary integer literals are a GNU extension`|
4147+----------------------------------------------------------------------------------+
4148
4149
4150-Wgnu-case-range
4151----------------
4152**Diagnostic text:**
4153
4154+----------------------------------------------------------------------+
4155|:warning:`warning:` |nbsp| :diagtext:`use of GNU case range extension`|
4156+----------------------------------------------------------------------+
4157
4158
4159-Wgnu-complex-integer
4160---------------------
4161**Diagnostic text:**
4162
4163+--------------------------------------------------------------------------------+
4164|:warning:`warning:` |nbsp| :diagtext:`complex integer types are a GNU extension`|
4165+--------------------------------------------------------------------------------+
4166
4167
4168-Wgnu-compound-literal-initializer
4169----------------------------------
4170**Diagnostic text:**
4171
4172+--------------------------------------------------------------------------------------------------------------------------------------------------+
4173|:warning:`warning:` |nbsp| :diagtext:`initialization of an array` |nbsp| :diagtext:`from a compound literal` |nbsp| :diagtext:`is a GNU extension`|
4174+--------------------------------------------------------------------------------------------------------------------------------------------------+
4175
4176
4177-Wgnu-conditional-omitted-operand
4178---------------------------------
4179**Diagnostic text:**
4180
4181+--------------------------------------------------------------------------------------------------------------+
4182|:warning:`warning:` |nbsp| :diagtext:`use of GNU ?: conditional expression extension, omitting middle operand`|
4183+--------------------------------------------------------------------------------------------------------------+
4184
4185
4186-Wgnu-designator
4187----------------
4188Some of the diagnostics controlled by this flag are enabled by default.
4189
4190**Diagnostic text:**
4191
4192+-----------------------------------------------------------------------+
4193|:warning:`warning:` |nbsp| :diagtext:`use of GNU array range extension`|
4194+-----------------------------------------------------------------------+
4195
4196+-------------------------------------------------------------------------------------+
4197|:warning:`warning:` |nbsp| :diagtext:`use of GNU 'missing =' extension in designator`|
4198+-------------------------------------------------------------------------------------+
4199
4200+--------------------------------------------------------------------------------------+
4201|:warning:`warning:` |nbsp| :diagtext:`use of GNU old-style field designator extension`|
4202+--------------------------------------------------------------------------------------+
4203
4204
4205-Wgnu-empty-initializer
4206-----------------------
4207**Diagnostic text:**
4208
4209+-----------------------------------------------------------------------------+
4210|:warning:`warning:` |nbsp| :diagtext:`use of GNU empty initializer extension`|
4211+-----------------------------------------------------------------------------+
4212
4213
4214-Wgnu-empty-struct
4215------------------
4216**Diagnostic text:**
4217
4218+----------------------------------------------------+--------------------+--------------------------------------+
4219|:warning:`warning:` |nbsp| :diagtext:`empty` |nbsp| |+------------------+| |nbsp| :diagtext:`is a GNU extension`|
4220| ||:diagtext:`struct`|| |
4221| |+------------------+| |
4222| ||:diagtext:`union` || |
4223| |+------------------+| |
4224+----------------------------------------------------+--------------------+--------------------------------------+
4225
4226+----------------------------------------------------------------------------------------------------------------------------------+-----------------------+--------------------------------------+
4227|:warning:`warning:` |nbsp| :diagtext:`flexible array member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in otherwise empty` |nbsp| |+---------------------+| |nbsp| :diagtext:`is a GNU extension`|
4228| ||:diagtext:`struct` || |
4229| |+---------------------+| |
4230| ||:diagtext:`interface`|| |
4231| |+---------------------+| |
4232| ||:diagtext:`union` || |
4233| |+---------------------+| |
4234| ||:diagtext:`class` || |
4235| |+---------------------+| |
4236| ||:diagtext:`enum` || |
4237| |+---------------------+| |
4238+----------------------------------------------------------------------------------------------------------------------------------+-----------------------+--------------------------------------+
4239
4240+---------------------------+--------------------+------------------------------------------------------------+
4241|:warning:`warning:` |nbsp| |+------------------+| |nbsp| :diagtext:`without named members is a GNU extension`|
4242| ||:diagtext:`struct`|| |
4243| |+------------------+| |
4244| ||:diagtext:`union` || |
4245| |+------------------+| |
4246+---------------------------+--------------------+------------------------------------------------------------+
4247
4248
4249-Wgnu-flexible-array-initializer
4250--------------------------------
4251**Diagnostic text:**
4252
4253+---------------------------------------------------------------------------------------+
4254|:warning:`warning:` |nbsp| :diagtext:`flexible array initialization is a GNU extension`|
4255+---------------------------------------------------------------------------------------+
4256
4257
4258-Wgnu-flexible-array-union-member
4259---------------------------------
4260**Diagnostic text:**
4261
4262+-------------------------------------------------------------------------------------------------------------------------------------+
4263|:warning:`warning:` |nbsp| :diagtext:`flexible array member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in a union is a GNU extension`|
4264+-------------------------------------------------------------------------------------------------------------------------------------+
4265
4266
4267-Wgnu-folding-constant
4268----------------------
4269**Diagnostic text:**
4270
4271+-------------------------------------------------------------------+----------------------+------------------------------------------------------------------------------------+
4272|:warning:`warning:` |nbsp| :diagtext:`expression is not an` |nbsp| |+--------------------+| |nbsp| :diagtext:`constant expression; folding it to a constant is a GNU extension`|
4273| ||:diagtext:`integer` || |
4274| |+--------------------+| |
4275| ||:diagtext:`integral`|| |
4276| |+--------------------+| |
4277+-------------------------------------------------------------------+----------------------+------------------------------------------------------------------------------------+
4278
4279+------------------------------------------------------------------------------------------------------------------------------------------------------------+
4280|:warning:`warning:` |nbsp| :diagtext:`in-class initializer for static data member is not a constant expression; folding it to a constant is a GNU extension`|
4281+------------------------------------------------------------------------------------------------------------------------------------------------------------+
4282
4283+-----------------------------------------------------------------------------------------------------+
4284|:warning:`warning:` |nbsp| :diagtext:`variable length array folded to constant array as an extension`|
4285+-----------------------------------------------------------------------------------------------------+
4286
4287
4288-Wgnu-imaginary-constant
4289------------------------
4290**Diagnostic text:**
4291
4292+------------------------------------------------------------------------------+
4293|:warning:`warning:` |nbsp| :diagtext:`imaginary constants are a GNU extension`|
4294+------------------------------------------------------------------------------+
4295
4296
4297-Wgnu-include-next
4298------------------
4299**Diagnostic text:**
4300
4301+-----------------------------------------------------------------------------+
4302|:warning:`warning:` |nbsp| :diagtext:`#include\_next is a language extension`|
4303+-----------------------------------------------------------------------------+
4304
4305
4306-Wgnu-label-as-value
4307--------------------
4308**Diagnostic text:**
4309
4310+----------------------------------------------------------------------------+
4311|:warning:`warning:` |nbsp| :diagtext:`use of GNU address-of-label extension`|
4312+----------------------------------------------------------------------------+
4313
4314+-------------------------------------------------------------------------+
4315|:warning:`warning:` |nbsp| :diagtext:`use of GNU indirect-goto extension`|
4316+-------------------------------------------------------------------------+
4317
4318
4319-Wgnu-redeclared-enum
4320---------------------
4321**Diagnostic text:**
4322
4323+------------------------------------------------------------------------------------------------------------------------------------------+
4324|:warning:`warning:` |nbsp| :diagtext:`redeclaration of already-defined enum` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a GNU extension`|
4325+------------------------------------------------------------------------------------------------------------------------------------------+
4326
4327
4328-Wgnu-statement-expression
4329--------------------------
4330**Diagnostic text:**
4331
4332+--------------------------------------------------------------------------------+
4333|:warning:`warning:` |nbsp| :diagtext:`use of GNU statement expression extension`|
4334+--------------------------------------------------------------------------------+
4335
4336
4337-Wgnu-static-float-init
4338-----------------------
4339This diagnostic is enabled by default.
4340
4341**Diagnostic text:**
4342
4343+--------------------------------------------------------------------------------------------------------------------------------------------------------+
4344|:warning:`warning:` |nbsp| :diagtext:`in-class initializer for static data member of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a GNU extension`|
4345+--------------------------------------------------------------------------------------------------------------------------------------------------------+
4346
4347
4348-Wgnu-string-literal-operator-template
4349--------------------------------------
4350This diagnostic is enabled by default.
4351
4352**Diagnostic text:**
4353
4354+--------------------------------------------------------------------------------------------+
4355|:warning:`warning:` |nbsp| :diagtext:`string literal operator templates are a GNU extension`|
4356+--------------------------------------------------------------------------------------------+
4357
4358
4359-Wgnu-union-cast
4360----------------
4361**Diagnostic text:**
4362
4363+----------------------------------------------------------------------------+
4364|:warning:`warning:` |nbsp| :diagtext:`cast to union type is a GNU extension`|
4365+----------------------------------------------------------------------------+
4366
4367
4368-Wgnu-variable-sized-type-not-at-end
4369------------------------------------
4370This diagnostic is enabled by default.
4371
4372**Diagnostic text:**
4373
4374+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4375|:warning:`warning:` |nbsp| :diagtext:`field` |nbsp| :placeholder:`A` |nbsp| :diagtext:`with variable sized type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`not at the end of a struct or class is a GNU extension`|
4376+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4377
4378
4379-Wgnu-zero-line-directive
4380-------------------------
4381**Diagnostic text:**
4382
4383+--------------------------------------------------------------------------------------------+
4384|:warning:`warning:` |nbsp| :diagtext:`#line directive with zero argument is a GNU extension`|
4385+--------------------------------------------------------------------------------------------+
4386
4387
4388-Wgnu-zero-variadic-macro-arguments
4389-----------------------------------
4390**Diagnostic text:**
4391
4392+---------------------------------------------------------------------------------------------------------------+
4393|:warning:`warning:` |nbsp| :diagtext:`must specify at least one argument for '...' parameter of variadic macro`|
4394+---------------------------------------------------------------------------------------------------------------+
4395
4396+---------------------------------------------------------------------------------------------------+
4397|:warning:`warning:` |nbsp| :diagtext:`token pasting of ',' and \_\_VA\_ARGS\_\_ is a GNU extension`|
4398+---------------------------------------------------------------------------------------------------+
4399
4400
4401-Wheader-guard
4402--------------
4403This diagnostic is enabled by default.
4404
4405**Diagnostic text:**
4406
4407+---------------------------------------------------------------------------------------------------------------------------------------+
4408|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is used as a header guard here, followed by #define of a different macro`|
4409+---------------------------------------------------------------------------------------------------------------------------------------+
4410
4411
4412-Wheader-hygiene
4413----------------
4414**Diagnostic text:**
4415
4416+--------------------------------------------------------------------------------------------+
4417|:warning:`warning:` |nbsp| :diagtext:`using namespace directive in global context in header`|
4418+--------------------------------------------------------------------------------------------+
4419
4420
4421-Widiomatic-parentheses
4422-----------------------
4423**Diagnostic text:**
4424
4425+-----------------------------------------------------------------------------------------------------------+
4426|:warning:`warning:` |nbsp| :diagtext:`using the result of an assignment as a condition without parentheses`|
4427+-----------------------------------------------------------------------------------------------------------+
4428
4429
4430-Wignored-attributes
4431--------------------
4432This diagnostic is enabled by default.
4433
4434**Diagnostic text:**
4435
4436+---------------------------+-------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4437|:warning:`warning:` |nbsp| |+-----------------+| |nbsp| :diagtext:`will always resolve to` |nbsp| :placeholder:`A` |nbsp| :diagtext:`even if weak definition of` |nbsp| :placeholder:`B` |nbsp| :diagtext:`is overridden`|
4438| ||:diagtext:`alias`|| |
4439| |+-----------------+| |
4440| ||:diagtext:`ifunc`|| |
4441| |+-----------------+| |
4442+---------------------------+-------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4443
4444+---------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+----------------------+
4445|:warning:`warning:` |nbsp| |+-----------------+| |nbsp| :diagtext:`will not be in section '`:placeholder:`A`:diagtext:`' but in the same section as the` |nbsp| |+--------------------+|
4446| ||:diagtext:`alias`|| ||:diagtext:`aliasee` ||
4447| |+-----------------+| |+--------------------+|
4448| ||:diagtext:`ifunc`|| ||:diagtext:`resolver`||
4449| |+-----------------+| |+--------------------+|
4450+---------------------------+-------------------+----------------------------------------------------------------------------------------------------------------+----------------------+
4451
4452+----------------------------------------------------------------------+------------------------+-------------------------------------+
4453|:warning:`warning:` |nbsp| :diagtext:`'abi\_tag' attribute on` |nbsp| |+----------------------+| |nbsp| :diagtext:`namespace ignored`|
4454| ||:diagtext:`non-inline`|| |
4455| |+----------------------+| |
4456| ||:diagtext:`anonymous` || |
4457| |+----------------------+| |
4458+----------------------------------------------------------------------+------------------------+-------------------------------------+
4459
4460+-----------------------------------------------------------------------------------------------------------------------+
4461|:warning:`warning:` |nbsp| :diagtext:`attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`after definition is ignored`|
4462+-----------------------------------------------------------------------------------------------------------------------+
4463
4464+--------------------------------------------------------------------------------------------------------------------------------+
4465|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute can only be applied to instance variables or properties`|
4466+--------------------------------------------------------------------------------------------------------------------------------+
4467
4468+--------------------------------------------------------------------------------+
4469|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute ignored`|
4470+--------------------------------------------------------------------------------+
4471
Richard Smith66310362017-10-26 21:06:52 +00004472+--------------------------------------------------------------------------------------------------------------------------+
4473|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute ignored for field of type` |nbsp| :placeholder:`B`|
4474+--------------------------------------------------------------------------------------------------------------------------+
4475
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004476+---------------------------------------------------------------------------------------------------+
4477|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute ignored on inline function`|
4478+---------------------------------------------------------------------------------------------------+
4479
4480+-------------------------------------------------------------------------------------------------------------------+
4481|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' attribute cannot be specified on a definition`|
4482+-------------------------------------------------------------------------------------------------------------------+
4483
4484+------------------------------------------------------------------------------------------------------------------------------------------------+
4485|:warning:`warning:` |nbsp| :diagtext:`attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`ignored, because it is not attached to a declaration`|
4486+------------------------------------------------------------------------------------------------------------------------------------------------+
4487
4488+--------------------------------------------------------------------------------------------------------+
4489|:warning:`warning:` |nbsp| :diagtext:`'nonnull' attribute applied to function with no pointer arguments`|
4490+--------------------------------------------------------------------------------------------------------+
4491
4492+-----------------------------------------------------------------------------------------------------+
4493|:warning:`warning:` |nbsp| :diagtext:`'nonnull' attribute when used on parameters takes no arguments`|
4494+-----------------------------------------------------------------------------------------------------+
4495
4496+--------------------------------------------------------------------------------------------------+
4497|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute ignored when parsing type`|
4498+--------------------------------------------------------------------------------------------------+
4499
4500+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
4501|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute only applies to a pointer or reference (`:placeholder:`B` |nbsp| :diagtext:`is invalid)`|
4502+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
4503
4504+----------------------------------------------------------------------------------------+------------------------------+-------------------------------------+
4505|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute only applies to`|+----------------------------+| |nbsp| :diagtext:`pointer arguments`|
4506| || || |
4507| |+----------------------------+| |
4508| || |nbsp| :diagtext:`constant`|| |
4509| |+----------------------------+| |
4510+----------------------------------------------------------------------------------------+------------------------------+-------------------------------------+
4511
4512+------------------------------------------------------------------------------------+
4513|:warning:`warning:` |nbsp| :diagtext:`attribute declaration must precede definition`|
4514+------------------------------------------------------------------------------------+
4515
4516+------------------------------------------------------------------------------------------------------------------------+
4517|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute only applies to return values that are pointers`|
4518+------------------------------------------------------------------------------------------------------------------------+
4519
4520+--------------------------------------------------------------------------------------------------------------------------------------+
4521|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute only applies to return values that are pointers or references`|
4522+--------------------------------------------------------------------------------------------------------------------------------------+
4523
4524+------------------------------------------------------------------------------------+
4525|:warning:`warning:` |nbsp| :diagtext:`'sentinel' attribute requires named arguments`|
4526+------------------------------------------------------------------------------------+
4527
4528+-----------------------------------------------------------------------------------------------+-----------------------+
4529|:warning:`warning:` |nbsp| :diagtext:`'sentinel' attribute only supported for variadic` |nbsp| |+---------------------+|
4530| ||:diagtext:`functions`||
4531| |+---------------------+|
4532| ||:diagtext:`blocks` ||
4533| |+---------------------+|
4534+-----------------------------------------------------------------------------------------------+-----------------------+
4535
4536+------------------------------------------------------------------------------------------------------------------------+
4537|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute argument not supported:` |nbsp| :placeholder:`B`|
4538+------------------------------------------------------------------------------------------------------------------------+
4539
4540+---------------------------------------------------------------------------------+
4541|:warning:`warning:` |nbsp| :diagtext:`unknown visibility` |nbsp| :placeholder:`A`|
4542+---------------------------------------------------------------------------------+
4543
4544+------------------------------------------------------------------------------------------------------------------------+--------------------------------+----------------------------------------+
4545|:warning:`warning:` |nbsp| :diagtext:`attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`cannot be applied to` |nbsp| |+------------------------------+| |nbsp| :diagtext:`without return value`|
4546| ||:diagtext:`functions` || |
4547| |+------------------------------+| |
4548| ||:diagtext:`Objective-C method`|| |
4549| |+------------------------------+| |
4550+------------------------------------------------------------------------------------------------------------------------+--------------------------------+----------------------------------------+
4551
4552+----------------------------------------------------------------------------------------------------+
4553|:warning:`warning:` |nbsp| :diagtext:`\_\_weak attribute cannot be specified on a field declaration`|
4554+----------------------------------------------------------------------------------------------------+
4555
4556+------------------------------------------------------------------------------------------------------------------------------+
4557|:warning:`warning:` |nbsp| :diagtext:`\_\_weak attribute cannot be specified on an automatic variable when ARC is not enabled`|
4558+------------------------------------------------------------------------------------------------------------------------------+
4559
4560+------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+
4561|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute only applies to` |nbsp| |+----------------------------------------------------------------------------------------------------------------+|
4562| ||:diagtext:`functions` ||
4563| |+----------------------------------------------------------------------------------------------------------------+|
4564| ||:diagtext:`unions` ||
4565| |+----------------------------------------------------------------------------------------------------------------+|
4566| ||:diagtext:`variables and functions` ||
4567| |+----------------------------------------------------------------------------------------------------------------+|
Richard Smithcf9f4222017-01-20 19:27:09 +00004568| ||:diagtext:`functions and global variables` ||
4569| |+----------------------------------------------------------------------------------------------------------------+|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004570| ||:diagtext:`functions, variables, and Objective-C interfaces` ||
4571| |+----------------------------------------------------------------------------------------------------------------+|
4572| ||:diagtext:`functions and methods` ||
4573| |+----------------------------------------------------------------------------------------------------------------+|
4574| ||:diagtext:`parameters` ||
4575| |+----------------------------------------------------------------------------------------------------------------+|
4576| ||:diagtext:`functions, methods and blocks` ||
4577| |+----------------------------------------------------------------------------------------------------------------+|
4578| ||:diagtext:`functions, methods, and classes` ||
4579| |+----------------------------------------------------------------------------------------------------------------+|
4580| ||:diagtext:`functions, methods, and parameters` ||
4581| |+----------------------------------------------------------------------------------------------------------------+|
Richard Smithcf9f4222017-01-20 19:27:09 +00004582| ||:diagtext:`functions, methods, and global variables` ||
4583| |+----------------------------------------------------------------------------------------------------------------+|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004584| ||:diagtext:`classes` ||
4585| |+----------------------------------------------------------------------------------------------------------------+|
4586| ||:diagtext:`enums` ||
4587| |+----------------------------------------------------------------------------------------------------------------+|
4588| ||:diagtext:`variables` ||
4589| |+----------------------------------------------------------------------------------------------------------------+|
4590| ||:diagtext:`methods` ||
4591| |+----------------------------------------------------------------------------------------------------------------+|
4592| ||:diagtext:`fields and global variables` ||
4593| |+----------------------------------------------------------------------------------------------------------------+|
4594| ||:diagtext:`structs` ||
4595| |+----------------------------------------------------------------------------------------------------------------+|
4596| ||:diagtext:`parameters and typedefs` ||
4597| |+----------------------------------------------------------------------------------------------------------------+|
4598| ||:diagtext:`variables and typedefs` ||
4599| |+----------------------------------------------------------------------------------------------------------------+|
4600| ||:diagtext:`thread-local variables` ||
4601| |+----------------------------------------------------------------------------------------------------------------+|
4602| ||:diagtext:`variables and fields` ||
4603| |+----------------------------------------------------------------------------------------------------------------+|
4604| ||:diagtext:`variables, data members and tag types` ||
4605| |+----------------------------------------------------------------------------------------------------------------+|
4606| ||:diagtext:`types and namespaces` ||
4607| |+----------------------------------------------------------------------------------------------------------------+|
4608| ||:diagtext:`Objective-C interfaces` ||
4609| |+----------------------------------------------------------------------------------------------------------------+|
4610| ||:diagtext:`methods and properties` ||
4611| |+----------------------------------------------------------------------------------------------------------------+|
Richard Smith66310362017-10-26 21:06:52 +00004612| ||:diagtext:`functions, methods, and properties` ||
4613| |+----------------------------------------------------------------------------------------------------------------+|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004614| ||:diagtext:`struct or union` ||
4615| |+----------------------------------------------------------------------------------------------------------------+|
4616| ||:diagtext:`struct, union or class` ||
4617| |+----------------------------------------------------------------------------------------------------------------+|
4618| ||:diagtext:`types` ||
4619| |+----------------------------------------------------------------------------------------------------------------+|
4620| ||:diagtext:`Objective-C instance methods` ||
4621| |+----------------------------------------------------------------------------------------------------------------+|
4622| ||:diagtext:`init methods of interface or class extension declarations` ||
4623| |+----------------------------------------------------------------------------------------------------------------+|
4624| ||:diagtext:`variables, functions and classes` ||
4625| |+----------------------------------------------------------------------------------------------------------------+|
4626| ||:diagtext:`functions, variables, classes, and Objective-C interfaces` ||
4627| |+----------------------------------------------------------------------------------------------------------------+|
4628| ||:diagtext:`Objective-C protocols` ||
4629| |+----------------------------------------------------------------------------------------------------------------+|
Richard Smithce9d5862016-09-14 01:51:10 +00004630| ||:diagtext:`variables with static or thread storage duration` ||
4631| |+----------------------------------------------------------------------------------------------------------------+|
Richard Smithcf9f4222017-01-20 19:27:09 +00004632| ||:diagtext:`functions, methods, properties, and global variables` ||
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004633| |+----------------------------------------------------------------------------------------------------------------+|
4634| ||:diagtext:`structs, unions, and typedefs` ||
4635| |+----------------------------------------------------------------------------------------------------------------+|
4636| ||:diagtext:`structs and typedefs` ||
4637| |+----------------------------------------------------------------------------------------------------------------+|
4638| ||:diagtext:`interface or protocol declarations` ||
4639| |+----------------------------------------------------------------------------------------------------------------+|
4640| ||:diagtext:`kernel functions` ||
4641| |+----------------------------------------------------------------------------------------------------------------+|
4642| ||:diagtext:`non-K&R-style functions` ||
4643| |+----------------------------------------------------------------------------------------------------------------+|
4644| ||:diagtext:`variables, enums, fields and typedefs` ||
4645| |+----------------------------------------------------------------------------------------------------------------+|
4646| ||:diagtext:`functions, methods, enums, and classes` ||
4647| |+----------------------------------------------------------------------------------------------------------------+|
4648| ||:diagtext:`structs, classes, variables, functions, and inline namespaces` ||
4649| |+----------------------------------------------------------------------------------------------------------------+|
4650| ||:diagtext:`variables, functions, methods, types, enumerations, enumerators, labels, and non-static data members`||
4651| |+----------------------------------------------------------------------------------------------------------------+|
Richard Smithcf9f4222017-01-20 19:27:09 +00004652| ||:diagtext:`classes and enumerations` ||
4653| |+----------------------------------------------------------------------------------------------------------------+|
Richard Smith9a016602017-04-13 22:44:22 +00004654| ||:diagtext:`named declarations` ||
4655| |+----------------------------------------------------------------------------------------------------------------+|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004656+------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+
4657
4658+--------------------------------------------------------------------------------------------------------------------------------------------------------+
4659|:warning:`warning:` |nbsp| :diagtext:`attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`ignored, because it cannot be applied to omitted return type`|
4660+--------------------------------------------------------------------------------------------------------------------------------------------------------+
4661
4662+----------------------------------------------------------------------------------------------------------------------------+
4663|:warning:`warning:` |nbsp| :diagtext:`calling convention` |nbsp| :placeholder:`A` |nbsp| :diagtext:`ignored for this target`|
4664+----------------------------------------------------------------------------------------------------------------------------+
4665
4666+-------------------------------------------------------------------------------------------------------------------+
4667|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`calling convention ignored on constructor/destructor`|
4668+-------------------------------------------------------------------------------------------------------------------+
4669
4670+--------------------------------------------------------------------------------------------------------------+
4671|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`calling convention ignored on variadic function`|
4672+--------------------------------------------------------------------------------------------------------------+
4673
4674+-------------------------------------------------------------------------------------------------------------------------------------------+
4675|:warning:`warning:` |nbsp| :diagtext:`attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`ignored, because it cannot be applied to a type`|
4676+-------------------------------------------------------------------------------------------------------------------------------------------+
4677
4678+------------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------------------------+
4679|:warning:`warning:` |nbsp| :diagtext:`attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is ignored, place it after "`|+---------------------+|:diagtext:`" to apply attribute to type declaration`|
4680| ||:diagtext:`class` || |
4681| |+---------------------+| |
4682| ||:diagtext:`struct` || |
4683| |+---------------------+| |
4684| ||:diagtext:`interface`|| |
4685| |+---------------------+| |
4686| ||:diagtext:`union` || |
4687| |+---------------------+| |
4688| ||:diagtext:`enum` || |
4689| |+---------------------+| |
4690+------------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------------------------+
4691
4692+--------------------------------------------------------------------------------------------+
4693|:warning:`warning:` |nbsp| :diagtext:`'deprecated' attribute on anonymous namespace ignored`|
4694+--------------------------------------------------------------------------------------------+
4695
4696+----------------------------------------------------------------------------------------------------------------------------------------------+
4697|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`redeclared inline;` |nbsp| :placeholder:`B` |nbsp| :diagtext:`attribute ignored`|
4698+----------------------------------------------------------------------------------------------------------------------------------------------+
4699
4700+----------------------------------------------------------------------------------------------------------------------------------------+
4701|:warning:`warning:` |nbsp| :diagtext:`attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is already applied with different parameters`|
4702+----------------------------------------------------------------------------------------------------------------------------------------+
4703
4704+--------------------------------------------------------------------------------------------------------------+
4705|:warning:`warning:` |nbsp| :diagtext:`attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is already applied`|
4706+--------------------------------------------------------------------------------------------------------------+
4707
4708+------------------------------------------------------------------------------------------------+
4709|:warning:`warning:` |nbsp| :diagtext:`Objective-C GC does not allow weak variables on the stack`|
4710+------------------------------------------------------------------------------------------------+
4711
4712+-------------------------------------------------------------------------------------------------------------------------+
4713|:warning:`warning:` |nbsp| :diagtext:`'gnu\_inline' attribute requires function to be marked 'inline', attribute ignored`|
4714+-------------------------------------------------------------------------------------------------------------------------+
4715
4716+---------------------------------------------------------------------------+------------------------------------+
4717|:warning:`warning:` |nbsp| :diagtext:`inheritance model ignored on` |nbsp| |+----------------------------------+|
4718| ||:diagtext:`primary template` ||
4719| |+----------------------------------+|
4720| ||:diagtext:`partial specialization`||
4721| |+----------------------------------+|
4722+---------------------------------------------------------------------------+------------------------------------+
4723
4724+--------------------------------------------------------------------------------------------------------------+
4725|:warning:`warning:` |nbsp| :diagtext:`'internal\_linkage' attribute on a non-static local variable is ignored`|
4726+--------------------------------------------------------------------------------------------------------------+
4727
4728+--------------------------------------------------------------------------------------------+
4729|:warning:`warning:` |nbsp| :diagtext:`qualifiers after comma in declarator list are ignored`|
4730+--------------------------------------------------------------------------------------------+
4731
4732+-------------------------------------------------------------------------------------------------------------+----------------------------------+
4733|:warning:`warning:` |nbsp| :diagtext:`MIPS 'interrupt' attribute only applies to functions that have` |nbsp| |+--------------------------------+|
4734| ||:diagtext:`no parameters` ||
4735| |+--------------------------------+|
4736| ||:diagtext:`a 'void' return type`||
4737| |+--------------------------------+|
4738+-------------------------------------------------------------------------------------------------------------+----------------------------------+
4739
4740+---------------------------------------------------------------------------------------+
4741|:warning:`warning:` |nbsp| :diagtext:`unknown attribute '`:placeholder:`A`:diagtext:`'`|
4742+---------------------------------------------------------------------------------------+
4743
4744+------------------------------------------------------------------------------------------------+-----------------------------------+------------------------------+
4745|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute only applies to` |nbsp| |+---------------------------------+| |nbsp| :diagtext:`parameters`|
4746| ||:diagtext:`Objective-C object` || |
4747| |+---------------------------------+| |
4748| ||:diagtext:`pointer` || |
4749| |+---------------------------------+| |
4750| ||:diagtext:`pointer-to-CF-pointer`|| |
4751| |+---------------------------------+| |
4752+------------------------------------------------------------------------------------------------+-----------------------------------+------------------------------+
4753
4754+------------------------------------------------------------------------------------------------+------------------------+---------------------------------------+--------------------------------------+
4755|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute only applies to` |nbsp| |+----------------------+| |nbsp| :diagtext:`that return` |nbsp| |+------------------------------------+|
4756| ||:diagtext:`functions` || ||:diagtext:`an Objective-C object` ||
4757| |+----------------------+| |+------------------------------------+|
4758| ||:diagtext:`methods` || ||:diagtext:`a pointer` ||
4759| |+----------------------+| |+------------------------------------+|
4760| ||:diagtext:`properties`|| ||:diagtext:`a non-retainable pointer`||
4761| |+----------------------+| |+------------------------------------+|
4762+------------------------------------------------------------------------------------------------+------------------------+---------------------------------------+--------------------------------------+
4763
4764+--------------------------------------------------------------------------------------------------------------------------------------------+
4765|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute is deprecated and ignored in OpenCL version` |nbsp| :placeholder:`B`|
4766+--------------------------------------------------------------------------------------------------------------------------------------------+
4767
4768+---------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------+
4769|:warning:`warning:` |nbsp| |+---------------------+| |nbsp| :diagtext:`of field` |nbsp| :placeholder:`B` |nbsp| :diagtext:`(`:placeholder:`C` |nbsp| :diagtext:`bits) does not match the` |nbsp| |+---------------------+| |nbsp| :diagtext:`of the first field in transparent union; transparent\_union attribute ignored`|
4770| ||:diagtext:`alignment`|| ||:diagtext:`alignment`|| |
4771| |+---------------------+| |+---------------------+| |
4772| ||:diagtext:`size` || ||:diagtext:`size` || |
4773| |+---------------------+| |+---------------------+| |
4774+---------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------+
4775
4776+---------------------------------------------------------------------------------------------+----------------------------+--------------------------------------------------------------------------------------------------+
4777|:warning:`warning:` |nbsp| :diagtext:`first field of a transparent union cannot have` |nbsp| |+--------------------------+| |nbsp| :diagtext:`type` |nbsp| :placeholder:`B`:diagtext:`; transparent\_union attribute ignored`|
4778| ||:diagtext:`floating point`|| |
4779| |+--------------------------+| |
4780| ||:diagtext:`vector` || |
4781| |+--------------------------+| |
4782+---------------------------------------------------------------------------------------------+----------------------------+--------------------------------------------------------------------------------------------------+
4783
4784+--------------------------------------------------------------------------------------------------------------------------------+
4785|:warning:`warning:` |nbsp| :diagtext:`transparent\_union attribute can only be applied to a union definition; attribute ignored`|
4786+--------------------------------------------------------------------------------------------------------------------------------+
4787
4788+-----------------------------------------------------------------------------------------------------------------------------------------+
4789|:warning:`warning:` |nbsp| :diagtext:`transparent union definition must contain at least one field; transparent\_union attribute ignored`|
4790+-----------------------------------------------------------------------------------------------------------------------------------------+
4791
4792+---------------------------------------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------------------+
4793|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' only applies to` |nbsp| |+-----------------------------------------------+| |nbsp| :diagtext:`types; type here is` |nbsp| :placeholder:`C`|
4794| ||:diagtext:`function` || |
4795| |+-----------------------------------------------+| |
4796| ||:diagtext:`pointer` || |
4797| |+-----------------------------------------------+| |
4798| ||:diagtext:`Objective-C object or block pointer`|| |
4799| |+-----------------------------------------------+| |
4800+---------------------------------------------------------------------------------------------+-------------------------------------------------+---------------------------------------------------------------+
4801
4802+-------------------------------------------------------------------------------------------------------------------------+
4803|:warning:`warning:` |nbsp| :diagtext:`\_\_declspec attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not supported`|
4804+-------------------------------------------------------------------------------------------------------------------------+
4805
Richard Smith66310362017-10-26 21:06:52 +00004806+-------------------------------------------------------+-------------------------+----------------------------------+---------------------------------------------------------------------------------+
4807|:warning:`warning:` |nbsp| :diagtext:`ignoring` |nbsp| |+-----------------------+|+--------------------------------+| |nbsp| :diagtext:`'`:placeholder:`C`:diagtext:`' in the target attribute string`|
4808| ||:diagtext:`unsupported`||| || |
4809| |+-----------------------+|+--------------------------------+| |
4810| ||:diagtext:`duplicate` ||| |nbsp| :diagtext:`architecture`|| |
4811| |+-----------------------+|+--------------------------------+| |
4812+-------------------------------------------------------+-------------------------+----------------------------------+---------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004813
4814
4815-Wignored-optimization-argument
4816-------------------------------
4817This diagnostic is enabled by default.
4818
4819**Diagnostic text:**
4820
4821+--------------------------------------------------------------------------------------------------------------------------------------------------+
4822|:warning:`warning:` |nbsp| :diagtext:`optimization flag '`:placeholder:`A`:diagtext:`' is not supported for target '`:placeholder:`B`:diagtext:`'`|
4823+--------------------------------------------------------------------------------------------------------------------------------------------------+
4824
4825+--------------------------------------------------------------------------------------------------------+
4826|:warning:`warning:` |nbsp| :diagtext:`optimization flag '`:placeholder:`A`:diagtext:`' is not supported`|
4827+--------------------------------------------------------------------------------------------------------+
4828
4829
Richard Smithcf9f4222017-01-20 19:27:09 +00004830-Wignored-pragma-intrinsic
4831--------------------------
4832This diagnostic is enabled by default.
4833
4834**Diagnostic text:**
4835
4836+------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
4837|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not a recognized builtin`|+----------------------------------------------------------------------------+|
4838| || ||
4839| |+----------------------------------------------------------------------------+|
4840| ||:diagtext:`; consider including <intrin.h> to access non-builtin intrinsics`||
4841| |+----------------------------------------------------------------------------+|
4842+------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+
4843
4844
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004845-Wignored-pragmas
4846-----------------
4847This diagnostic is enabled by default.
4848
Richard Smithcf9f4222017-01-20 19:27:09 +00004849Also controls `-Wignored-pragma-intrinsic`_.
4850
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004851**Diagnostic text:**
4852
4853+------------------------------------------------------------------------------+---------------------------+-----------------------+
4854|:warning:`warning:` |nbsp| :diagtext:`expected '=' following '#pragma` |nbsp| |+-------------------------+|:diagtext:`' - ignored`|
4855| ||:diagtext:`align` || |
4856| |+-------------------------+| |
4857| ||:diagtext:`options align`|| |
4858| |+-------------------------+| |
4859+------------------------------------------------------------------------------+---------------------------+-----------------------+
4860
4861+-----------------------------------------------------------------------------------+---------------------------+-----------------------+
4862|:warning:`warning:` |nbsp| :diagtext:`invalid alignment option in '#pragma` |nbsp| |+-------------------------+|:diagtext:`' - ignored`|
4863| ||:diagtext:`align` || |
4864| |+-------------------------+| |
4865| ||:diagtext:`options align`|| |
4866| |+-------------------------+| |
4867+-----------------------------------------------------------------------------------+---------------------------+-----------------------+
4868
Richard Smithcf9f4222017-01-20 19:27:09 +00004869+-----------------------------------------------------------------------------------------------------------+
4870|:warning:`warning:` |nbsp| :diagtext:`OpenCL extension end directive mismatches begin directive - ignoring`|
4871+-----------------------------------------------------------------------------------------------------------+
4872
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004873+----------------------------------------------------------------------------------------------------+
4874|:warning:`warning:` |nbsp| :diagtext:`'#pragma comment` |nbsp| :placeholder:`A`:diagtext:`' ignored`|
4875+----------------------------------------------------------------------------------------------------+
4876
4877+-------------------------------------------------------------------------------------------------------+
4878|:warning:`warning:` |nbsp| :diagtext:`missing argument to debug command '`:placeholder:`A`:diagtext:`'`|
4879+-------------------------------------------------------------------------------------------------------+
4880
4881+----------------------------------------------------------------------------------------------+
4882|:warning:`warning:` |nbsp| :diagtext:`unexpected debug command '`:placeholder:`A`:diagtext:`'`|
4883+----------------------------------------------------------------------------------------------+
4884
4885+------------------------------------------------------------------------------------------------------------------------+
4886|:warning:`warning:` |nbsp| :diagtext:`expected action or ')' in '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignored`|
4887+------------------------------------------------------------------------------------------------------------------------+
4888
4889+--------------------------------------------------------------------------------------------------------------+
4890|:warning:`warning:` |nbsp| :diagtext:`missing ':' after` |nbsp| :placeholder:`A` |nbsp| :diagtext:`- ignoring`|
4891+--------------------------------------------------------------------------------------------------------------+
4892
4893+---------------------------------------------------------------------------------------------------------------------+
4894|:warning:`warning:` |nbsp| :diagtext:`missing ':' or ')' after` |nbsp| :placeholder:`A` |nbsp| :diagtext:`- ignoring`|
4895+---------------------------------------------------------------------------------------------------------------------+
4896
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004897+---------------------------------------------------------------------------------------------------------------------+
4898|:warning:`warning:` |nbsp| :diagtext:`expected identifier in '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignored`|
4899+---------------------------------------------------------------------------------------------------------------------+
4900
4901+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4902|:warning:`warning:` |nbsp| :diagtext:`expected 'compiler', 'lib', 'user', or a string literal for the section name in '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignored`|
4903+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4904
4905+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4906|:warning:`warning:` |nbsp| :diagtext:`expected integer between` |nbsp| :placeholder:`A` |nbsp| :diagtext:`and` |nbsp| :placeholder:`B` |nbsp| :diagtext:`inclusive in '#pragma` |nbsp| :placeholder:`C`:diagtext:`' - ignored`|
4907+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4908
4909+-----------------------------------------------------------------------------------------------------------------+
4910|:warning:`warning:` |nbsp| :diagtext:`missing '(' after '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignoring`|
4911+-----------------------------------------------------------------------------------------------------------------+
4912
4913+------------------------------------------------------------------------------------------------------------------------+
4914|:warning:`warning:` |nbsp| :diagtext:`expected non-wide string literal in '#pragma` |nbsp| :placeholder:`A`:diagtext:`'`|
4915+------------------------------------------------------------------------------------------------------------------------+
4916
Richard Smithcf9f4222017-01-20 19:27:09 +00004917+-------------------------------------------------------+---------------------------------------------------+------------------------------+
4918|:warning:`warning:` |nbsp| :diagtext:`expected` |nbsp| |+-------------------------------------------------+| |nbsp| :diagtext:`- ignoring`|
4919| ||:diagtext:`'enable', 'disable', 'begin' or 'end'`|| |
4920| |+-------------------------------------------------+| |
4921| ||:diagtext:`'disable'` || |
4922| |+-------------------------------------------------+| |
4923+-------------------------------------------------------+---------------------------------------------------+------------------------------+
4924
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004925+-----------------------------------------------------------------------------------------------------------+
4926|:warning:`warning:` |nbsp| :diagtext:`expected ')' or ',' in '#pragma` |nbsp| :placeholder:`A`:diagtext:`'`|
4927+-----------------------------------------------------------------------------------------------------------+
4928
4929+-----------------------------------------------------------------------------------------------------------------+
4930|:warning:`warning:` |nbsp| :diagtext:`missing ')' after '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignoring`|
4931+-----------------------------------------------------------------------------------------------------------------+
4932
4933+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
4934|:warning:`warning:` |nbsp| :diagtext:`expected a stack label or a string literal for the section name in '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignored`|
4935+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
4936
4937+------------------------------------------------------------------------------------------------------------------------------------------------+
4938|:warning:`warning:` |nbsp| :diagtext:`expected a string literal for the section name in '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignored`|
4939+------------------------------------------------------------------------------------------------------------------------------------------------+
4940
4941+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
4942|:warning:`warning:` |nbsp| :diagtext:`expected push, pop or a string literal for the section name in '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignored`|
4943+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
4944
4945+---------------------------------------------------------------------------------------------------------------------+
4946|:warning:`warning:` |nbsp| :diagtext:`extra tokens at end of '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignored`|
4947+---------------------------------------------------------------------------------------------------------------------+
4948
Richard Smithcf9f4222017-01-20 19:27:09 +00004949+----------------------------------------------------------------------------------------------------------+
4950|:warning:`warning:` |nbsp| :diagtext:`incorrect use of #pragma clang force\_cuda\_host\_device begin\|end`|
4951+----------------------------------------------------------------------------------------------------------+
4952
Richard Smithb6a3b4b2016-09-12 05:58:29 +00004953+-------------------------------------------------------------------------------------------------------------------+
4954|:warning:`warning:` |nbsp| :diagtext:`'#pragma init\_seg' is only supported when targeting a Microsoft environment`|
4955+-------------------------------------------------------------------------------------------------------------------+
4956
4957+-----------------------------------------------------------------------------------------------------------------+
4958|:warning:`warning:` |nbsp| :diagtext:`unknown action for '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignored`|
4959+-----------------------------------------------------------------------------------------------------------------+
4960
4961+------------------------------------------------------------------------------------------------------------------------------------------------+
4962|:warning:`warning:` |nbsp| :diagtext:`unknown action '`:placeholder:`B`:diagtext:`' for '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignored`|
4963+------------------------------------------------------------------------------------------------------------------------------------------------+
4964
4965+----------------------------------------------------------------------------------------------+
4966|:warning:`warning:` |nbsp| :diagtext:`incorrect use of '#pragma ms\_struct on\|off' - ignored`|
4967+----------------------------------------------------------------------------------------------+
4968
4969+--------------------------------------------------------------------------------------------------+
4970|:warning:`warning:` |nbsp| :diagtext:`#pragma options align=reset failed:` |nbsp| :placeholder:`A`|
4971+--------------------------------------------------------------------------------------------------+
4972
4973+---------------------------------------------------------------------------------------------+
4974|:warning:`warning:` |nbsp| :diagtext:`expected 'align' following '#pragma options' - ignored`|
4975+---------------------------------------------------------------------------------------------+
4976
4977+--------------------------------------------------------------------------------------------------------+
4978|:warning:`warning:` |nbsp| :diagtext:`expected #pragma pack parameter to be '1', '2', '4', '8', or '16'`|
4979+--------------------------------------------------------------------------------------------------------+
4980
4981+-------------------------------------------------------------------------------------------------+
4982|:warning:`warning:` |nbsp| :diagtext:`expected integer or identifier in '#pragma pack' - ignored`|
4983+-------------------------------------------------------------------------------------------------+
4984
4985+----------------------------------------------------------------------------------------------------------------------------+
4986|:warning:`warning:` |nbsp| :diagtext:`#pragma` |nbsp| :placeholder:`A`:diagtext:`(pop, ...) failed:` |nbsp| :placeholder:`B`|
4987+----------------------------------------------------------------------------------------------------------------------------+
4988
4989+------------------------------------------------------------------------------------------------------------------------------+
4990|:warning:`warning:` |nbsp| :diagtext:`pragma pop\_macro could not pop '`:placeholder:`A`:diagtext:`', no matching push\_macro`|
4991+------------------------------------------------------------------------------------------------------------------------------+
4992
4993+---------------------------------------------------------------------------------------------------------------------+
4994|:warning:`warning:` |nbsp| :diagtext:`unknown OpenCL extension` |nbsp| :placeholder:`A` |nbsp| :diagtext:`- ignoring`|
4995+---------------------------------------------------------------------------------------------------------------------+
4996
4997+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
4998|:warning:`warning:` |nbsp| :diagtext:`known but unsupported action '`:placeholder:`B`:diagtext:`' for '#pragma` |nbsp| :placeholder:`A`:diagtext:`' - ignored`|
4999+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
5000
5001+-------------------------------------------------------------------------------------------------------------------------+
5002|:warning:`warning:` |nbsp| :diagtext:`unsupported OpenCL extension` |nbsp| :placeholder:`A` |nbsp| :diagtext:`- ignoring`|
5003+-------------------------------------------------------------------------------------------------------------------------+
5004
5005+-----------------------------------------------------------------------------------------------+
5006|:warning:`warning:` |nbsp| :diagtext:`expected '#pragma unused' argument to be a variable name`|
5007+-----------------------------------------------------------------------------------------------+
5008
5009+------------------------------------------------------------------------------------------+
5010|:warning:`warning:` |nbsp| :diagtext:`only variables can be arguments to '#pragma unused'`|
5011+------------------------------------------------------------------------------------------+
5012
5013+----------------------------------------------------------------------------------------------------------------------------------------------+
5014|:warning:`warning:` |nbsp| :diagtext:`undeclared variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`used as an argument for '#pragma unused'`|
5015+----------------------------------------------------------------------------------------------------------------------------------------------+
5016
5017
5018-Wignored-qualifiers
5019--------------------
5020Some of the diagnostics controlled by this flag are enabled by default.
5021
5022**Diagnostic text:**
5023
5024+--------------------------------------------------+------------------------------------+----------------------------------------------------------------+
5025|:warning:`warning:` |nbsp| :diagtext:`ARC` |nbsp| |+----------------------------------+| |nbsp| :diagtext:`lifetime qualifier on return type is ignored`|
5026| ||:diagtext:`unused` || |
5027| |+----------------------------------+| |
5028| ||:diagtext:`\_\_unsafe\_unretained`|| |
5029| |+----------------------------------+| |
5030| ||:diagtext:`\_\_strong` || |
5031| |+----------------------------------+| |
5032| ||:diagtext:`\_\_weak` || |
5033| |+----------------------------------+| |
5034| ||:diagtext:`\_\_autoreleasing` || |
5035| |+----------------------------------+| |
5036+--------------------------------------------------+------------------------------------+----------------------------------------------------------------+
5037
5038+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
5039|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' qualifier on omitted return type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`has no effect`|
5040+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
5041
5042+------------------------------------------------------------------------------------+---------------+------------------------------------------+-------------------+-----------------------------+
5043|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' type qualifier`|+-------------+| |nbsp| :diagtext:`on return type` |nbsp| |+-----------------+| |nbsp| :diagtext:`no effect`|
5044| || || ||:diagtext:`:has` || |
5045| |+-------------+| |+-----------------+| |
5046| ||:diagtext:`s`|| ||:diagtext:`:have`|| |
5047| |+-------------+| |+-----------------+| |
5048+------------------------------------------------------------------------------------+---------------+------------------------------------------+-------------------+-----------------------------+
5049
5050+---------------------------------------------------------------------------------------------------------------------------------------------------------+
5051|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' qualifier on function type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`has no effect`|
5052+---------------------------------------------------------------------------------------------------------------------------------------------------------+
5053
5054+----------------------------------------------------------------------------------------------------------------------------------------------------------+
5055|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' qualifier on reference type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`has no effect`|
5056+----------------------------------------------------------------------------------------------------------------------------------------------------------+
5057
5058
5059-Wimplicit
5060----------
5061Some of the diagnostics controlled by this flag are enabled by default.
5062
5063Controls `-Wimplicit-function-declaration`_, `-Wimplicit-int`_.
5064
5065
5066-Wimplicit-atomic-properties
5067----------------------------
5068**Diagnostic text:**
5069
5070+-----------------------------------------------------------------------------------------------------+
5071|:warning:`warning:` |nbsp| :diagtext:`property is assumed atomic when auto-synthesizing the property`|
5072+-----------------------------------------------------------------------------------------------------+
5073
5074+----------------------------------------------------------------------------+
5075|:warning:`warning:` |nbsp| :diagtext:`property is assumed atomic by default`|
5076+----------------------------------------------------------------------------+
5077
5078
5079-Wimplicit-conversion-floating-point-to-bool
5080--------------------------------------------
5081This diagnostic is enabled by default.
5082
5083**Diagnostic text:**
5084
5085+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5086|:warning:`warning:` |nbsp| :diagtext:`implicit conversion turns floating-point number into bool:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
5087+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5088
5089
5090-Wimplicit-exception-spec-mismatch
5091----------------------------------
5092This diagnostic is enabled by default.
5093
5094**Diagnostic text:**
5095
5096+-----------------------------------------------------------------------------------+----------------------+----------------------------------------------------------------------+----------------------+-------------------------------------------+
5097|:warning:`warning:` |nbsp| :diagtext:`function previously declared with an` |nbsp| |+--------------------+| |nbsp| :diagtext:`exception specification redeclared with an` |nbsp| |+--------------------+| |nbsp| :diagtext:`exception specification`|
5098| ||:diagtext:`explicit`|| ||:diagtext:`implicit`|| |
5099| |+--------------------+| |+--------------------+| |
5100| ||:diagtext:`implicit`|| ||:diagtext:`explicit`|| |
5101| |+--------------------+| |+--------------------+| |
5102+-----------------------------------------------------------------------------------+----------------------+----------------------------------------------------------------------+----------------------+-------------------------------------------+
5103
5104
5105-Wimplicit-fallthrough
5106----------------------
5107Also controls `-Wimplicit-fallthrough-per-function`_.
5108
5109**Diagnostic text:**
5110
5111+---------------------------------------------------------------------------------+
5112|:warning:`warning:` |nbsp| :diagtext:`fallthrough annotation in unreachable code`|
5113+---------------------------------------------------------------------------------+
5114
5115+-------------------------------------------------------------------------------------+
5116|:warning:`warning:` |nbsp| :diagtext:`unannotated fall-through between switch labels`|
5117+-------------------------------------------------------------------------------------+
5118
5119
5120-Wimplicit-fallthrough-per-function
5121-----------------------------------
5122**Diagnostic text:**
5123
5124+------------------------------------------------------------------------------------------------------------------+
5125|:warning:`warning:` |nbsp| :diagtext:`unannotated fall-through between switch labels in partly-annotated function`|
5126+------------------------------------------------------------------------------------------------------------------+
5127
5128
5129-Wimplicit-function-declaration
5130-------------------------------
5131Some of the diagnostics controlled by this flag are enabled by default.
5132
5133**Diagnostic text:**
5134
Richard Smith66310362017-10-26 21:06:52 +00005135+----------------------------------------------------------------------------------------------------------------------------------------+--------------------+
5136|:warning:`warning:` |nbsp| :diagtext:`implicit declaration of function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is invalid in` |nbsp| |+------------------+|
5137| ||:diagtext:`C99` ||
5138| |+------------------+|
5139| ||:diagtext:`OpenCL`||
5140| |+------------------+|
5141+----------------------------------------------------------------------------------------------------------------------------------------+--------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005142
5143+---------------------------------------------------------------------------------------------------------------------------------------------+
5144|:warning:`warning:` |nbsp| :diagtext:`implicitly declaring library function '`:placeholder:`A`:diagtext:`' with type` |nbsp| :placeholder:`B`|
5145+---------------------------------------------------------------------------------------------------------------------------------------------+
5146
5147+---------------------------------------------------------------------------------+
5148|:error:`error:` |nbsp| :diagtext:`use of unknown builtin` |nbsp| :placeholder:`A`|
5149+---------------------------------------------------------------------------------+
5150
5151+-----------------------------------------------------------------------------------------------+
5152|:warning:`warning:` |nbsp| :diagtext:`implicit declaration of function` |nbsp| :placeholder:`A`|
5153+-----------------------------------------------------------------------------------------------+
5154
5155
5156-Wimplicit-int
5157--------------
5158This diagnostic is enabled by default.
5159
5160**Diagnostic text:**
5161
5162+--------------------------------------------------------------------------------+
5163|:warning:`warning:` |nbsp| :diagtext:`type specifier missing, defaults to 'int'`|
5164+--------------------------------------------------------------------------------+
5165
5166
5167-Wimplicit-retain-self
5168----------------------
5169**Diagnostic text:**
5170
5171+---------------------------------------------------------------------------------------------------------------------------------------+
5172|:warning:`warning:` |nbsp| :diagtext:`block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior`|
5173+---------------------------------------------------------------------------------------------------------------------------------------+
5174
5175
5176-Wimplicitly-unsigned-literal
5177-----------------------------
5178This diagnostic is enabled by default.
5179
5180**Diagnostic text:**
5181
5182+----------------------------------------------------------------------------------------------------------------------------------------+
5183|:warning:`warning:` |nbsp| :diagtext:`integer literal is too large to be represented in a signed integer type, interpreting as unsigned`|
5184+----------------------------------------------------------------------------------------------------------------------------------------+
5185
5186
5187-Wimport
5188--------
5189This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
5190
5191-Wimport-preprocessor-directive-pedantic
5192----------------------------------------
5193**Diagnostic text:**
5194
5195+----------------------------------------------------------------------+
5196|:warning:`warning:` |nbsp| :diagtext:`#import is a language extension`|
5197+----------------------------------------------------------------------+
5198
5199
5200-Winaccessible-base
5201-------------------
5202This diagnostic is enabled by default.
5203
5204**Diagnostic text:**
5205
5206+-----------------------------------------------------------------------------------------------------------------------------------------------+
5207|:warning:`warning:` |nbsp| :diagtext:`direct base` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is inaccessible due to ambiguity:`:placeholder:`B`|
5208+-----------------------------------------------------------------------------------------------------------------------------------------------+
5209
5210
5211-Winclude-next-absolute-path
5212----------------------------
5213This diagnostic is enabled by default.
5214
5215**Diagnostic text:**
5216
5217+------------------------------------------------------------------------+
5218|:warning:`warning:` |nbsp| :diagtext:`#include\_next with absolute path`|
5219+------------------------------------------------------------------------+
5220
5221
5222-Winclude-next-outside-header
5223-----------------------------
5224This diagnostic is enabled by default.
5225
5226**Diagnostic text:**
5227
5228+----------------------------------------------------------------------------+
5229|:warning:`warning:` |nbsp| :diagtext:`#include\_next in primary source file`|
5230+----------------------------------------------------------------------------+
5231
5232
Richard Smithcf9f4222017-01-20 19:27:09 +00005233-Wincompatible-exception-spec
5234-----------------------------
5235This diagnostic is enabled by default.
5236
5237**Diagnostic text:**
5238
5239+--------------------------------------------------------------------------+----------------------+--------------------------------+
5240|:warning:`warning:` |nbsp| :diagtext:`exception specifications of` |nbsp| |+--------------------+| |nbsp| :diagtext:`types differ`|
5241| ||:diagtext:`return` || |
5242| |+--------------------+| |
5243| ||:diagtext:`argument`|| |
5244| |+--------------------+| |
5245+--------------------------------------------------------------------------+----------------------+--------------------------------+
5246
5247+-----------------------------------------------------------------------------------------------+
5248|:warning:`warning:` |nbsp| :diagtext:`target exception specification is not superset of source`|
5249+-----------------------------------------------------------------------------------------------+
5250
5251
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005252-Wincompatible-function-pointer-types
5253-------------------------------------
5254This diagnostic is enabled by default.
5255
5256**Diagnostic text:**
5257
5258+----------------------------------------------------------------------------------+----------------------------------------------------------------+---------------------------------------+
5259|:warning:`warning:` |nbsp| :diagtext:`incompatible function pointer types` |nbsp| |+--------------------------------------------------------------+|+-------------------------------------+|
5260| ||:diagtext:`assigning to different types` ||| ||
5261| |+--------------------------------------------------------------+|+-------------------------------------+|
5262| ||:diagtext:`passing to parameter of different type` |||:diagtext:`; dereference with \*` ||
5263| |+--------------------------------------------------------------+|+-------------------------------------+|
5264| ||:diagtext:`returning from function with different return type`|||:diagtext:`; take the address with &`||
5265| |+--------------------------------------------------------------+|+-------------------------------------+|
5266| ||:diagtext:`converting between types` |||:diagtext:`; remove \*` ||
5267| |+--------------------------------------------------------------+|+-------------------------------------+|
5268| ||:diagtext:`initializing with expression of different type` |||:diagtext:`; remove &` ||
5269| |+--------------------------------------------------------------+|+-------------------------------------+|
5270| ||:diagtext:`sending to parameter of different type` || |
5271| |+--------------------------------------------------------------+| |
5272| ||:diagtext:`casting between types` || |
5273| |+--------------------------------------------------------------+| |
5274+----------------------------------------------------------------------------------+----------------------------------------------------------------+---------------------------------------+
5275
5276
5277-Wincompatible-library-redeclaration
5278------------------------------------
5279This diagnostic is enabled by default.
5280
5281**Diagnostic text:**
5282
5283+-------------------------------------------------------------------------------------------------------------+
5284|:warning:`warning:` |nbsp| :diagtext:`incompatible redeclaration of library function` |nbsp| :placeholder:`A`|
5285+-------------------------------------------------------------------------------------------------------------+
5286
5287
5288-Wincompatible-ms-struct
5289------------------------
5290This diagnostic is an error by default, but the flag ``-Wno-incompatible-ms-struct`` can be used to disable the error.
5291
5292**Diagnostic text:**
5293
5294+---------------------------------------------------------------------------------------------------------------------------------------------+
5295|:error:`error:` |nbsp| :diagtext:`ms\_struct may not produce Microsoft-compatible layouts for classes with base classes or virtual functions`|
5296+---------------------------------------------------------------------------------------------------------------------------------------------+
5297
5298
5299-Wincompatible-pointer-types
5300----------------------------
5301This diagnostic is enabled by default.
5302
Richard Smith8cba2912016-09-14 01:55:42 +00005303Also controls `-Wincompatible-function-pointer-types`_, `-Wincompatible-pointer-types-discards-qualifiers`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005304
5305**Diagnostic text:**
5306
5307+-------------------------------------------------------------------------+----------------------------------------------------------------+---------------------------------------+
5308|:warning:`warning:` |nbsp| :diagtext:`incompatible pointer types` |nbsp| |+--------------------------------------------------------------+|+-------------------------------------+|
5309| ||:diagtext:`assigning to different types` ||| ||
5310| |+--------------------------------------------------------------+|+-------------------------------------+|
5311| ||:diagtext:`passing to parameter of different type` |||:diagtext:`; dereference with \*` ||
5312| |+--------------------------------------------------------------+|+-------------------------------------+|
5313| ||:diagtext:`returning from function with different return type`|||:diagtext:`; take the address with &`||
5314| |+--------------------------------------------------------------+|+-------------------------------------+|
5315| ||:diagtext:`converting between types` |||:diagtext:`; remove \*` ||
5316| |+--------------------------------------------------------------+|+-------------------------------------+|
5317| ||:diagtext:`initializing with expression of different type` |||:diagtext:`; remove &` ||
5318| |+--------------------------------------------------------------+|+-------------------------------------+|
5319| ||:diagtext:`sending to parameter of different type` || |
5320| |+--------------------------------------------------------------+| |
5321| ||:diagtext:`casting between types` || |
5322| |+--------------------------------------------------------------+| |
5323+-------------------------------------------------------------------------+----------------------------------------------------------------+---------------------------------------+
5324
5325
5326-Wincompatible-pointer-types-discards-qualifiers
5327------------------------------------------------
5328This diagnostic is enabled by default.
5329
5330**Diagnostic text:**
5331
5332+---------------------------+----------------------------------------------------------------+---------------------------------------------------------------+
5333|:warning:`warning:` |nbsp| |+--------------------------------------------------------------+| |nbsp| :diagtext:`discards qualifiers in nested pointer types`|
5334| ||:diagtext:`assigning to different types` || |
5335| |+--------------------------------------------------------------+| |
5336| ||:diagtext:`passing to parameter of different type` || |
5337| |+--------------------------------------------------------------+| |
5338| ||:diagtext:`returning from function with different return type`|| |
5339| |+--------------------------------------------------------------+| |
5340| ||:diagtext:`converting between types` || |
5341| |+--------------------------------------------------------------+| |
5342| ||:diagtext:`initializing with expression of different type` || |
5343| |+--------------------------------------------------------------+| |
5344| ||:diagtext:`sending to parameter of different type` || |
5345| |+--------------------------------------------------------------+| |
5346| ||:diagtext:`casting between types` || |
5347| |+--------------------------------------------------------------+| |
5348+---------------------------+----------------------------------------------------------------+---------------------------------------------------------------+
5349
5350+---------------------------+----------------------------------------------------------------+---------------------------------------+
5351|:warning:`warning:` |nbsp| |+--------------------------------------------------------------+| |nbsp| :diagtext:`discards qualifiers`|
5352| ||:diagtext:`assigning to different types` || |
5353| |+--------------------------------------------------------------+| |
5354| ||:diagtext:`passing to parameter of different type` || |
5355| |+--------------------------------------------------------------+| |
5356| ||:diagtext:`returning from function with different return type`|| |
5357| |+--------------------------------------------------------------+| |
5358| ||:diagtext:`converting between types` || |
5359| |+--------------------------------------------------------------+| |
5360| ||:diagtext:`initializing with expression of different type` || |
5361| |+--------------------------------------------------------------+| |
5362| ||:diagtext:`sending to parameter of different type` || |
5363| |+--------------------------------------------------------------+| |
5364| ||:diagtext:`casting between types` || |
5365| |+--------------------------------------------------------------+| |
5366+---------------------------+----------------------------------------------------------------+---------------------------------------+
5367
5368
5369-Wincompatible-property-type
5370----------------------------
5371This diagnostic is enabled by default.
5372
5373**Diagnostic text:**
5374
5375+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5376|:warning:`warning:` |nbsp| :diagtext:`property type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is incompatible with type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`inherited from` |nbsp| :placeholder:`C`|
5377+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5378
5379
5380-Wincompatible-sysroot
5381----------------------
5382This diagnostic is enabled by default.
5383
5384**Diagnostic text:**
5385
5386+------------------------------------------------------------------------------------------------------------------------------------+
5387|:warning:`warning:` |nbsp| :diagtext:`using sysroot for '`:placeholder:`A`:diagtext:`' but targeting '`:placeholder:`B`:diagtext:`'`|
5388+------------------------------------------------------------------------------------------------------------------------------------+
5389
5390
5391-Wincomplete-implementation
5392---------------------------
5393This diagnostic is enabled by default.
5394
5395**Diagnostic text:**
5396
5397+-----------------------------------------------------------------------------------------------------------------+
5398|:warning:`warning:` |nbsp| :diagtext:`method definition for` |nbsp| :placeholder:`A` |nbsp| :diagtext:`not found`|
5399+-----------------------------------------------------------------------------------------------------------------+
5400
5401
5402-Wincomplete-module
5403-------------------
5404Some of the diagnostics controlled by this flag are enabled by default.
5405
5406Controls `-Wincomplete-umbrella`_, `-Wnon-modular-include-in-module`_.
5407
5408
5409-Wincomplete-umbrella
5410---------------------
5411This diagnostic is enabled by default.
5412
5413**Diagnostic text:**
5414
5415+---------------------------------------------------------------------------------------+
5416|:warning:`warning:` |nbsp| :diagtext:`missing submodule '`:placeholder:`A`:diagtext:`'`|
5417+---------------------------------------------------------------------------------------+
5418
Richard Smith66310362017-10-26 21:06:52 +00005419+--------------------------------------------------------------------------------------------------+
5420|:warning:`warning:` |nbsp| :diagtext:`umbrella directory '`:placeholder:`A`:diagtext:`' not found`|
5421+--------------------------------------------------------------------------------------------------+
5422
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005423+-------------------------------------------------------------------------------------------------------------------------------------------------------+
5424|:warning:`warning:` |nbsp| :diagtext:`umbrella header for module '`:placeholder:`A`:diagtext:`' does not include header '`:placeholder:`B`:diagtext:`'`|
5425+-------------------------------------------------------------------------------------------------------------------------------------------------------+
5426
5427
5428-Winconsistent-dllimport
5429------------------------
5430This diagnostic is enabled by default.
5431
5432**Diagnostic text:**
5433
5434+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5435|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`redeclared without` |nbsp| :placeholder:`B` |nbsp| :diagtext:`attribute: previous` |nbsp| :placeholder:`B` |nbsp| :diagtext:`ignored`|
5436+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5437
5438+------------------------------------------------------------------------------------------------------------------------------------+
5439|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`redeclared without 'dllimport' attribute: 'dllexport' attribute added`|
5440+------------------------------------------------------------------------------------------------------------------------------------+
5441
5442
Richard Smith9a016602017-04-13 22:44:22 +00005443-Winconsistent-missing-destructor-override
5444------------------------------------------
5445**Diagnostic text:**
5446
5447+------------------------------------------------------------------------------------------------------------------+
5448|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`overrides a destructor but is not marked 'override'`|
5449+------------------------------------------------------------------------------------------------------------------+
5450
5451
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005452-Winconsistent-missing-override
5453-------------------------------
5454This diagnostic is enabled by default.
5455
5456**Diagnostic text:**
5457
5458+-----------------------------------------------------------------------------------------------------------------------+
5459|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`overrides a member function but is not marked 'override'`|
5460+-----------------------------------------------------------------------------------------------------------------------+
5461
5462
5463-Wincrement-bool
5464----------------
5465This diagnostic is enabled by default.
5466
5467Also controls `-Wdeprecated-increment-bool`_.
5468
5469**Diagnostic text:**
5470
5471+------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00005472|:error:`error:` |nbsp| :diagtext:`ISO C++17 does not allow incrementing expression of type bool`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005473+------------------------------------------------------------------------------------------------+
5474
5475
5476-Winfinite-recursion
5477--------------------
5478**Diagnostic text:**
5479
5480+---------------------------------------------------------------------------------------+
5481|:warning:`warning:` |nbsp| :diagtext:`all paths through this function will call itself`|
5482+---------------------------------------------------------------------------------------+
5483
5484
5485-Winit-self
5486-----------
5487This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
5488
5489-Winitializer-overrides
5490-----------------------
5491This diagnostic is enabled by default.
5492
5493**Diagnostic text:**
5494
5495+---------------------------------------------------------------------------------------------------+
5496|:warning:`warning:` |nbsp| :diagtext:`initializer overrides prior initialization of this subobject`|
5497+---------------------------------------------------------------------------------------------------+
5498
5499+---------------------------------------------------------------------------------------------------------------------------------------+
5500|:warning:`warning:` |nbsp| :diagtext:`subobject initialization overrides initialization of other fields within its enclosing subobject`|
5501+---------------------------------------------------------------------------------------------------------------------------------------+
5502
5503
Richard Smithcf9f4222017-01-20 19:27:09 +00005504-Winjected-class-name
5505---------------------
5506This diagnostic is enabled by default.
5507
5508**Diagnostic text:**
5509
5510+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+--------------------------------------------------------------+------------------------+---------------------------+
5511|:warning:`warning:` |nbsp| :diagtext:`ISO C++ specifies that qualified reference to` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a constructor name rather than a` |nbsp| |+-------------------------+| |nbsp| :diagtext:`in this context, despite preceding` |nbsp| |+----------------------+| |nbsp| :diagtext:`keyword`|
5512| ||:diagtext:`template name`|| ||:diagtext:`'typename'`|| |
5513| |+-------------------------+| |+----------------------+| |
5514| ||:diagtext:`type` || ||:diagtext:`'template'`|| |
5515| |+-------------------------+| |+----------------------+| |
5516+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+--------------------------------------------------------------+------------------------+---------------------------+
5517
5518
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005519-Winline
5520--------
5521This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
5522
5523-Winline-asm
5524------------
5525This diagnostic is enabled by default.
5526
5527**Diagnostic text:**
5528
5529The text of this diagnostic is not controlled by Clang.
5530
5531
5532-Winline-new-delete
5533-------------------
5534This diagnostic is enabled by default.
5535
5536**Diagnostic text:**
5537
5538+----------------------------------------------------------------------------------------------------------------------------------+
5539|:warning:`warning:` |nbsp| :diagtext:`replacement function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`cannot be declared 'inline'`|
5540+----------------------------------------------------------------------------------------------------------------------------------+
5541
5542
5543-Winstantiation-after-specialization
5544------------------------------------
5545This diagnostic is enabled by default.
5546
5547**Diagnostic text:**
5548
5549+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5550|:warning:`warning:` |nbsp| :diagtext:`explicit instantiation of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`that occurs after an explicit specialization has no effect`|
5551+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5552
5553
5554-Wint-conversion
5555----------------
5556This diagnostic is enabled by default.
5557
5558**Diagnostic text:**
5559
5560+-----------------------------------------------------------------------------------------+----------------------------------------------------------------+---------------------------------------+
5561|:warning:`warning:` |nbsp| :diagtext:`incompatible integer to pointer conversion` |nbsp| |+--------------------------------------------------------------+|+-------------------------------------+|
5562| ||:diagtext:`assigning to different types` ||| ||
5563| |+--------------------------------------------------------------+|+-------------------------------------+|
5564| ||:diagtext:`passing to parameter of different type` |||:diagtext:`; dereference with \*` ||
5565| |+--------------------------------------------------------------+|+-------------------------------------+|
5566| ||:diagtext:`returning from function with different return type`|||:diagtext:`; take the address with &`||
5567| |+--------------------------------------------------------------+|+-------------------------------------+|
5568| ||:diagtext:`converting between types` |||:diagtext:`; remove \*` ||
5569| |+--------------------------------------------------------------+|+-------------------------------------+|
5570| ||:diagtext:`initializing with expression of different type` |||:diagtext:`; remove &` ||
5571| |+--------------------------------------------------------------+|+-------------------------------------+|
5572| ||:diagtext:`sending to parameter of different type` || |
5573| |+--------------------------------------------------------------+| |
5574| ||:diagtext:`casting between types` || |
5575| |+--------------------------------------------------------------+| |
5576+-----------------------------------------------------------------------------------------+----------------------------------------------------------------+---------------------------------------+
5577
5578+-----------------------------------------------------------------------------------------+----------------------------------------------------------------+---------------------------------------+
5579|:warning:`warning:` |nbsp| :diagtext:`incompatible pointer to integer conversion` |nbsp| |+--------------------------------------------------------------+|+-------------------------------------+|
5580| ||:diagtext:`assigning to different types` ||| ||
5581| |+--------------------------------------------------------------+|+-------------------------------------+|
5582| ||:diagtext:`passing to parameter of different type` |||:diagtext:`; dereference with \*` ||
5583| |+--------------------------------------------------------------+|+-------------------------------------+|
5584| ||:diagtext:`returning from function with different return type`|||:diagtext:`; take the address with &`||
5585| |+--------------------------------------------------------------+|+-------------------------------------+|
5586| ||:diagtext:`converting between types` |||:diagtext:`; remove \*` ||
5587| |+--------------------------------------------------------------+|+-------------------------------------+|
5588| ||:diagtext:`initializing with expression of different type` |||:diagtext:`; remove &` ||
5589| |+--------------------------------------------------------------+|+-------------------------------------+|
5590| ||:diagtext:`sending to parameter of different type` || |
5591| |+--------------------------------------------------------------+| |
5592| ||:diagtext:`casting between types` || |
5593| |+--------------------------------------------------------------+| |
5594+-----------------------------------------------------------------------------------------+----------------------------------------------------------------+---------------------------------------+
5595
5596
5597-Wint-conversions
5598-----------------
5599Synonym for `-Wint-conversion`_.
5600
5601
5602-Wint-to-pointer-cast
5603---------------------
5604This diagnostic is enabled by default.
5605
5606Also controls `-Wint-to-void-pointer-cast`_.
5607
5608**Diagnostic text:**
5609
5610+-------------------------------------------------------------------------------------------------------------------------------------------+
5611|:warning:`warning:` |nbsp| :diagtext:`cast to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`from smaller integer type` |nbsp| :placeholder:`A`|
5612+-------------------------------------------------------------------------------------------------------------------------------------------+
5613
5614
5615-Wint-to-void-pointer-cast
5616--------------------------
5617This diagnostic is enabled by default.
5618
5619**Diagnostic text:**
5620
5621+-------------------------------------------------------------------------------------------------------------------------------------------+
5622|:warning:`warning:` |nbsp| :diagtext:`cast to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`from smaller integer type` |nbsp| :placeholder:`A`|
5623+-------------------------------------------------------------------------------------------------------------------------------------------+
5624
5625
5626-Winteger-overflow
5627------------------
5628This diagnostic is enabled by default.
5629
5630**Diagnostic text:**
5631
5632+-----------------------------------------------------------------------------------------------------------------------------------------------------+
5633|:warning:`warning:` |nbsp| :diagtext:`overflow in expression; result is` |nbsp| :placeholder:`A` |nbsp| :diagtext:`with type` |nbsp| :placeholder:`B`|
5634+-----------------------------------------------------------------------------------------------------------------------------------------------------+
5635
5636
5637-Winvalid-command-line-argument
5638-------------------------------
5639This diagnostic is enabled by default.
5640
5641Also controls `-Wignored-optimization-argument`_.
5642
5643**Diagnostic text:**
5644
Richard Smith66310362017-10-26 21:06:52 +00005645+-----------------------------------------------------------------------------------------------------------------------------------------+
5646|:warning:`warning:` |nbsp| :diagtext:`the object size sanitizer has no effect at -O0, but is explicitly enabled:` |nbsp| :placeholder:`A`|
5647+-----------------------------------------------------------------------------------------------------------------------------------------+
5648
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005649+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5650|:warning:`warning:` |nbsp| :diagtext:`optimization level '`:placeholder:`A`:diagtext:`' is not supported; using '`:placeholder:`B`:placeholder:`C`:diagtext:`' instead`|
5651+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5652
5653
5654-Winvalid-constexpr
5655-------------------
5656This diagnostic is an error by default, but the flag ``-Wno-invalid-constexpr`` can be used to disable the error.
5657
5658**Diagnostic text:**
5659
5660+----------------------------------------------------+-------------------------+--------------------------------------------------------+
5661|:error:`error:` |nbsp| :diagtext:`constexpr` |nbsp| |+-----------------------+| |nbsp| :diagtext:`never produces a constant expression`|
5662| ||:diagtext:`function` || |
5663| |+-----------------------+| |
5664| ||:diagtext:`constructor`|| |
5665| |+-----------------------+| |
5666+----------------------------------------------------+-------------------------+--------------------------------------------------------+
5667
5668
5669-Winvalid-iboutlet
5670------------------
5671This diagnostic is enabled by default.
5672
5673**Diagnostic text:**
5674
5675+---------------------------+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
5676|:warning:`warning:` |nbsp| |+-----------------------------+| |nbsp| :diagtext:`with` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute must be an object type (invalid` |nbsp| :placeholder:`B`:diagtext:`)`|
5677| ||:diagtext:`instance variable`|| |
5678| |+-----------------------------+| |
5679| ||:diagtext:`property` || |
5680| |+-----------------------------+| |
5681+---------------------------+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
5682
5683+---------------------------------------------------------------------------------------------------------+
5684|:warning:`warning:` |nbsp| :diagtext:`IBOutletCollection properties should be copy/strong and not assign`|
5685+---------------------------------------------------------------------------------------------------------+
5686
5687
5688-Winvalid-initializer-from-system-header
5689----------------------------------------
5690This diagnostic is enabled by default.
5691
5692**Diagnostic text:**
5693
5694+--------------------------------------------------------------------------------------------------------------+
5695|:warning:`warning:` |nbsp| :diagtext:`invalid constructor form class in system header, should not be explicit`|
5696+--------------------------------------------------------------------------------------------------------------+
5697
5698
Richard Smith66310362017-10-26 21:06:52 +00005699-Winvalid-ios-deployment-target
5700-------------------------------
5701This diagnostic is an error by default, but the flag ``-Wno-invalid-ios-deployment-target`` can be used to disable the error.
5702
5703**Diagnostic text:**
5704
5705+------------------------------------------------------------------------------------------------------------------------------------------------------------+
5706|:error:`error:` |nbsp| :diagtext:`invalid iOS deployment version '`:placeholder:`A`:diagtext:`', iOS 10 is the maximum deployment target for 32-bit targets`|
5707+------------------------------------------------------------------------------------------------------------------------------------------------------------+
5708
5709
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005710-Winvalid-noreturn
5711------------------
5712This diagnostic is enabled by default.
5713
5714**Diagnostic text:**
5715
5716+-------------------------------------------------------------------------------------+
5717|:warning:`warning:` |nbsp| :diagtext:`function declared 'noreturn' should not return`|
5718+-------------------------------------------------------------------------------------+
5719
5720+--------------------------------------------------------------------------------------------------------------------------------+
5721|:warning:`warning:` |nbsp| :diagtext:`function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`declared 'noreturn' should not return`|
5722+--------------------------------------------------------------------------------------------------------------------------------+
5723
5724
5725-Winvalid-offsetof
5726------------------
5727This diagnostic is enabled by default.
5728
5729**Diagnostic text:**
5730
5731+----------------------------------------------------------------------------------------+
5732|:warning:`warning:` |nbsp| :diagtext:`offset of on non-POD type` |nbsp| :placeholder:`A`|
5733+----------------------------------------------------------------------------------------+
5734
5735+----------------------------------------------------------------------------------------------------+
5736|:warning:`warning:` |nbsp| :diagtext:`offset of on non-standard-layout type` |nbsp| :placeholder:`A`|
5737+----------------------------------------------------------------------------------------------------+
5738
5739
5740-Winvalid-or-nonexistent-directory
5741----------------------------------
5742Some of the diagnostics controlled by this flag are enabled by default.
5743
5744**Diagnostic text:**
5745
5746+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5747|:warning:`warning:` |nbsp| :diagtext:`environment variable SCE\_ORBIS\_SDK\_DIR is set, but points to invalid or nonexistent directory '`:placeholder:`A`:diagtext:`'`|
5748+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5749
5750+------------------------------------------------------------------------------------------------------------------------------------------------------------+
5751|:warning:`warning:` |nbsp| :diagtext:`unable to find` |nbsp| :placeholder:`A` |nbsp| :diagtext:`directory, expected to be in '`:placeholder:`B`:diagtext:`'`|
5752+------------------------------------------------------------------------------------------------------------------------------------------------------------+
5753
5754
Richard Smithcf9f4222017-01-20 19:27:09 +00005755-Winvalid-partial-specialization
5756--------------------------------
5757This diagnostic is an error by default, but the flag ``-Wno-invalid-partial-specialization`` can be used to disable the error.
5758
5759**Diagnostic text:**
5760
5761+-----------------------+----------------------+-----------------------------------------------------------------------------------------------------+
5762|:error:`error:` |nbsp| |+--------------------+| |nbsp| :diagtext:`template partial specialization is not more specialized than the primary template`|
5763| ||:diagtext:`class` || |
5764| |+--------------------+| |
5765| ||:diagtext:`variable`|| |
5766| |+--------------------+| |
5767+-----------------------+----------------------+-----------------------------------------------------------------------------------------------------+
5768
5769
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005770-Winvalid-pch
5771-------------
5772This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
5773
5774-Winvalid-pp-token
5775------------------
5776This diagnostic is enabled by default.
5777
5778**Diagnostic text:**
5779
5780+---------------------------------------------------------------+
5781|:warning:`warning:` |nbsp| :diagtext:`empty character constant`|
5782+---------------------------------------------------------------+
5783
5784+------------------------------------------------------------------+-----------------+-----------------------------+
5785|:warning:`warning:` |nbsp| :diagtext:`missing terminating` |nbsp| |+---------------+| |nbsp| :diagtext:`character`|
5786| ||:diagtext:`'` || |
5787| |+---------------+| |
5788| ||:diagtext:`'"'`|| |
5789| |+---------------+| |
5790+------------------------------------------------------------------+-----------------+-----------------------------+
5791
5792
5793-Winvalid-source-encoding
5794-------------------------
5795This diagnostic is enabled by default.
5796
5797**Diagnostic text:**
5798
5799+--------------------------------------------------------------------------------------+
5800|:warning:`warning:` |nbsp| :diagtext:`illegal character encoding in character literal`|
5801+--------------------------------------------------------------------------------------+
5802
5803+-----------------------------------------------------------------------------------+
5804|:warning:`warning:` |nbsp| :diagtext:`illegal character encoding in string literal`|
5805+-----------------------------------------------------------------------------------+
5806
5807
5808-Winvalid-token-paste
5809---------------------
5810This diagnostic is an error by default, but the flag ``-Wno-invalid-token-paste`` can be used to disable the error.
5811
5812**Diagnostic text:**
5813
5814+----------------------------------------------------------------------------------------------------------------+
5815|:error:`error:` |nbsp| :diagtext:`pasting formed '`:placeholder:`A`:diagtext:`', an invalid preprocessing token`|
5816+----------------------------------------------------------------------------------------------------------------+
5817
5818
5819-Wjump-seh-finally
5820------------------
5821This diagnostic is enabled by default.
5822
5823**Diagnostic text:**
5824
5825+-------------------------------------------------------------------------------------------+
5826|:warning:`warning:` |nbsp| :diagtext:`jump out of \_\_finally block has undefined behavior`|
5827+-------------------------------------------------------------------------------------------+
5828
5829
5830-Wkeyword-compat
5831----------------
5832This diagnostic is enabled by default.
5833
5834**Diagnostic text:**
5835
5836+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+
5837|:warning:`warning:` |nbsp| :diagtext:`keyword '`:placeholder:`A`:diagtext:`' will be made available as an identifier` |nbsp| |+-----------------------------------------------------+|
5838| ||:diagtext:`here` ||
5839| |+-----------------------------------------------------+|
5840| ||:diagtext:`for the remainder of the translation unit`||
5841| |+-----------------------------------------------------+|
5842+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------+
5843
5844
5845-Wkeyword-macro
5846---------------
5847**Diagnostic text:**
5848
5849+----------------------------------------------------------------------------+
5850|:warning:`warning:` |nbsp| :diagtext:`keyword is hidden by macro definition`|
5851+----------------------------------------------------------------------------+
5852
5853
5854-Wknr-promoted-parameter
5855------------------------
5856This diagnostic is enabled by default.
5857
5858**Diagnostic text:**
5859
5860+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5861|:warning:`warning:` |nbsp| :diagtext:`promoted type of K&R function parameter is not compatible with parameter type` |nbsp| :diagtext:`declared in a previous prototype`|
5862+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5863
5864
5865-Wlanguage-extension-token
5866--------------------------
5867**Diagnostic text:**
5868
5869+-----------------------------------------------------+
5870|:warning:`warning:` |nbsp| :diagtext:`extension used`|
5871+-----------------------------------------------------+
5872
5873
5874-Wlarge-by-value-copy
5875---------------------
5876This diagnostic is enabled by default.
5877
5878**Diagnostic text:**
5879
5880+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5881|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a large (`:placeholder:`B` |nbsp| :diagtext:`bytes) pass-by-value argument; pass it by reference instead ?`|
5882+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5883
5884+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5885|:warning:`warning:` |nbsp| :diagtext:`return value of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a large (`:placeholder:`B` |nbsp| :diagtext:`bytes) pass-by-value object; pass it by reference instead ?`|
5886+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5887
5888
5889-Wliblto
5890--------
Richard Smithcf9f4222017-01-20 19:27:09 +00005891This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005892
5893-Wliteral-conversion
5894--------------------
5895This diagnostic is enabled by default.
5896
5897**Diagnostic text:**
5898
5899+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5900|:warning:`warning:` |nbsp| :diagtext:`implicit conversion from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`changes value from` |nbsp| :placeholder:`C` |nbsp| :diagtext:`to` |nbsp| :placeholder:`D`|
5901+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5902
5903
5904-Wliteral-range
5905---------------
5906This diagnostic is enabled by default.
5907
5908**Diagnostic text:**
5909
5910+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5911|:warning:`warning:` |nbsp| :diagtext:`magnitude of floating-point constant too large for type` |nbsp| :placeholder:`A`:diagtext:`; maximum is` |nbsp| :placeholder:`B`|
5912+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5913
5914+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5915|:warning:`warning:` |nbsp| :diagtext:`magnitude of floating-point constant too small for type` |nbsp| :placeholder:`A`:diagtext:`; minimum is` |nbsp| :placeholder:`B`|
5916+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5917
5918
5919-Wlocal-type-template-args
5920--------------------------
5921Some of the diagnostics controlled by this flag are enabled by default.
5922
5923Also controls `-Wc++98-compat-local-type-template-args`_.
5924
5925**Diagnostic text:**
5926
5927+------------------------------------------------------------------------------------------------+
5928|:warning:`warning:` |nbsp| :diagtext:`template argument uses local type` |nbsp| :placeholder:`A`|
5929+------------------------------------------------------------------------------------------------+
5930
5931
5932-Wlogical-not-parentheses
5933-------------------------
5934This diagnostic is enabled by default.
5935
5936**Diagnostic text:**
5937
Richard Smithcf9f4222017-01-20 19:27:09 +00005938+--------------------------------------------------------------------------------------------------------+------------------------------+
5939|:warning:`warning:` |nbsp| :diagtext:`logical not is only applied to the left hand side of this` |nbsp| |+----------------------------+|
5940| ||:diagtext:`comparison` ||
5941| |+----------------------------+|
5942| ||:diagtext:`bitwise operator`||
5943| |+----------------------------+|
5944+--------------------------------------------------------------------------------------------------------+------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00005945
5946
5947-Wlogical-op-parentheses
5948------------------------
5949This diagnostic is enabled by default.
5950
5951**Diagnostic text:**
5952
5953+---------------------------------------------------------+
5954|:warning:`warning:` |nbsp| :diagtext:`'&&' within '\|\|'`|
5955+---------------------------------------------------------+
5956
5957
5958-Wlong-long
5959-----------
5960Also controls `-Wc++11-long-long`_.
5961
5962**Diagnostic text:**
5963
5964+-----------------------------------------------------------------------------------------------+
5965|:warning:`warning:` |nbsp| :diagtext:`'long long' is an extension when C99 mode is not enabled`|
5966+-----------------------------------------------------------------------------------------------+
5967
5968
5969-Wloop-analysis
5970---------------
5971Controls `-Wfor-loop-analysis`_, `-Wrange-loop-analysis`_.
5972
5973
5974-Wmacro-redefined
5975-----------------
5976This diagnostic is enabled by default.
5977
5978**Diagnostic text:**
5979
5980+------------------------------------------------------------------------------+
5981|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`macro redefined`|
5982+------------------------------------------------------------------------------+
5983
5984
5985-Wmain
5986------
5987Some of the diagnostics controlled by this flag are enabled by default.
5988
5989**Diagnostic text:**
5990
5991+--------------------------------------------------------------------------------------------+
5992|:warning:`warning:` |nbsp| :diagtext:`ISO C++ does not allow 'main' to be used by a program`|
5993+--------------------------------------------------------------------------------------------+
5994
5995+--------------------------------------------------------------------------------------+
5996|:warning:`warning:` |nbsp| :diagtext:`'main' is not allowed to be declared \_Noreturn`|
5997+--------------------------------------------------------------------------------------+
5998
5999+------------------------------------------------------------------------------------+
6000|:warning:`warning:` |nbsp| :diagtext:`'main' is not allowed to be declared variadic`|
6001+------------------------------------------------------------------------------------+
6002
6003+-------------------------------------------------------------------------------+
6004|:warning:`warning:` |nbsp| :diagtext:`only one parameter on 'main' declaration`|
6005+-------------------------------------------------------------------------------+
6006
6007+---------------------------------------------------------------------------------------------------------+
6008|:warning:`warning:` |nbsp| :diagtext:`variable named 'main' with external linkage has undefined behavior`|
6009+---------------------------------------------------------------------------------------------------------+
6010
Richard Smithcf9f4222017-01-20 19:27:09 +00006011+------------------------------------------------------------------------+
6012|:warning:`warning:` |nbsp| :diagtext:`bool literal returned from 'main'`|
6013+------------------------------------------------------------------------+
6014
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006015+---------------------------------------------------------------------------+
6016|:warning:`warning:` |nbsp| :diagtext:`'main' should not be declared static`|
6017+---------------------------------------------------------------------------+
6018
6019
6020-Wmain-return-type
6021------------------
6022This diagnostic is enabled by default.
6023
6024**Diagnostic text:**
6025
6026+-------------------------------------------------------------------------+
6027|:warning:`warning:` |nbsp| :diagtext:`return type of 'main' is not 'int'`|
6028+-------------------------------------------------------------------------+
6029
6030
6031-Wmalformed-warning-check
6032-------------------------
6033This diagnostic is enabled by default.
6034
6035**Diagnostic text:**
6036
6037+---------------------------------------------------------------------------------------------+
6038|:warning:`warning:` |nbsp| :diagtext:`\_\_has\_warning expected option name (e.g. "-Wundef")`|
6039+---------------------------------------------------------------------------------------------+
6040
6041
6042-Wmany-braces-around-scalar-init
6043--------------------------------
6044This diagnostic is enabled by default.
6045
6046**Diagnostic text:**
6047
6048+--------------------------------------------------------------------------------+
6049|:warning:`warning:` |nbsp| :diagtext:`too many braces around scalar initializer`|
6050+--------------------------------------------------------------------------------+
6051
6052
Richard Smithcf9f4222017-01-20 19:27:09 +00006053-Wmax-unsigned-zero
6054-------------------
6055This diagnostic is enabled by default.
6056
6057**Diagnostic text:**
6058
6059+----------------------------------------------------------------+---------------------------------------+------------------------------------------------------+
6060|:warning:`warning:` |nbsp| :diagtext:`taking the max of` |nbsp| |+-------------------------------------+| |nbsp| :diagtext:`is always equal to the other value`|
6061| ||:diagtext:`a value and unsigned zero`|| |
6062| |+-------------------------------------+| |
6063| ||:diagtext:`unsigned zero and a value`|| |
6064| |+-------------------------------------+| |
6065+----------------------------------------------------------------+---------------------------------------+------------------------------------------------------+
6066
6067
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006068-Wmemsize-comparison
6069--------------------
6070This diagnostic is enabled by default.
6071
6072**Diagnostic text:**
6073
6074+-----------------------------------------------------------------------------------------------------------------------+
6075|:warning:`warning:` |nbsp| :diagtext:`size argument in` |nbsp| :placeholder:`A` |nbsp| :diagtext:`call is a comparison`|
6076+-----------------------------------------------------------------------------------------------------------------------+
6077
6078
6079-Wmethod-signatures
6080-------------------
6081**Diagnostic text:**
6082
6083+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6084|:warning:`warning:` |nbsp| :diagtext:`conflicting parameter types in implementation of` |nbsp| :placeholder:`A`:diagtext:`:` |nbsp| :placeholder:`B` |nbsp| :diagtext:`vs` |nbsp| :placeholder:`C`|
6085+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6086
6087+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6088|:warning:`warning:` |nbsp| :diagtext:`conflicting return type in implementation of` |nbsp| :placeholder:`A`:diagtext:`:` |nbsp| :placeholder:`B` |nbsp| :diagtext:`vs` |nbsp| :placeholder:`C`|
6089+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6090
6091
6092-Wmicrosoft
6093-----------
6094Some of the diagnostics controlled by this flag are enabled by default.
6095
Richard Smith8cba2912016-09-14 01:55:42 +00006096Controls `-Winconsistent-dllimport`_, `-Wmicrosoft-anon-tag`_, `-Wmicrosoft-cast`_, `-Wmicrosoft-charize`_, `-Wmicrosoft-comment-paste`_, `-Wmicrosoft-const-init`_, `-Wmicrosoft-cpp-macro`_, `-Wmicrosoft-default-arg-redefinition`_, `-Wmicrosoft-end-of-file`_, `-Wmicrosoft-enum-forward-reference`_, `-Wmicrosoft-enum-value`_, `-Wmicrosoft-exception-spec`_, `-Wmicrosoft-explicit-constructor-call`_, `-Wmicrosoft-extra-qualification`_, `-Wmicrosoft-fixed-enum`_, `-Wmicrosoft-flexible-array`_, `-Wmicrosoft-goto`_, `-Wmicrosoft-include`_, `-Wmicrosoft-mutable-reference`_, `-Wmicrosoft-pure-definition`_, `-Wmicrosoft-redeclare-static`_, `-Wmicrosoft-sealed`_, `-Wmicrosoft-template`_, `-Wmicrosoft-union-member-reference`_, `-Wmicrosoft-unqualified-friend`_, `-Wmicrosoft-using-decl`_, `-Wmicrosoft-void-pseudo-dtor`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006097
6098
6099-Wmicrosoft-anon-tag
6100--------------------
6101Some of the diagnostics controlled by this flag are enabled by default.
6102
6103**Diagnostic text:**
6104
6105+-----------------------------------------------------------------------------+--------------------+---------------------------------------------+
6106|:warning:`warning:` |nbsp| :diagtext:`types declared in an anonymous` |nbsp| |+------------------+| |nbsp| :diagtext:`are a Microsoft extension`|
6107| ||:diagtext:`struct`|| |
6108| |+------------------+| |
6109| ||:diagtext:`union` || |
6110| |+------------------+| |
6111+-----------------------------------------------------------------------------+--------------------+---------------------------------------------+
6112
6113+--------------------------------------------------------+---------------------+---------------------------------------------+
6114|:warning:`warning:` |nbsp| :diagtext:`anonymous` |nbsp| |+-------------------+| |nbsp| :diagtext:`are a Microsoft extension`|
6115| ||:diagtext:`structs`|| |
6116| |+-------------------+| |
6117| ||:diagtext:`unions` || |
6118| |+-------------------+| |
6119+--------------------------------------------------------+---------------------+---------------------------------------------+
6120
6121
6122-Wmicrosoft-cast
6123----------------
6124This diagnostic is enabled by default.
6125
6126**Diagnostic text:**
6127
6128+------------------------------------------------------------------------------------------------------------------------------+
6129|:warning:`warning:` |nbsp| :diagtext:`static\_cast between pointer-to-function and pointer-to-object is a Microsoft extension`|
6130+------------------------------------------------------------------------------------------------------------------------------+
6131
6132+-------------------------------------------------------------------------------------------------------------------------------------+
6133|:warning:`warning:` |nbsp| :diagtext:`implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension`|
6134+-------------------------------------------------------------------------------------------------------------------------------------+
6135
6136
6137-Wmicrosoft-charize
6138-------------------
6139**Diagnostic text:**
6140
6141+-------------------------------------------------------------------------------------+
6142|:warning:`warning:` |nbsp| :diagtext:`charizing operator #@ is a Microsoft extension`|
6143+-------------------------------------------------------------------------------------+
6144
6145
6146-Wmicrosoft-comment-paste
6147-------------------------
6148**Diagnostic text:**
6149
6150+----------------------------------------------------------------------------------------------------------+
6151|:warning:`warning:` |nbsp| :diagtext:`pasting two '/' tokens into a '//' comment is a Microsoft extension`|
6152+----------------------------------------------------------------------------------------------------------+
6153
6154
6155-Wmicrosoft-const-init
6156----------------------
6157This diagnostic is enabled by default.
6158
6159**Diagnostic text:**
6160
6161+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+--------------------------------------------+
6162|:warning:`warning:` |nbsp| :diagtext:`default initialization of an object of const type` |nbsp| :placeholder:`A`|+---------------------------------------------------------------+| |nbsp| :diagtext:`is a Microsoft extension`|
6163| || || |
6164| |+---------------------------------------------------------------+| |
6165| || |nbsp| :diagtext:`without a user-provided default constructor`|| |
6166| |+---------------------------------------------------------------+| |
6167+----------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+--------------------------------------------+
6168
6169
6170-Wmicrosoft-cpp-macro
6171---------------------
6172**Diagnostic text:**
6173
6174+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
6175|:warning:`warning:` |nbsp| :diagtext:`C++ operator` |nbsp| :placeholder:`A` |nbsp| :diagtext:`(aka` |nbsp| :placeholder:`B`:diagtext:`) used as a macro name`|
6176+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
6177
6178
6179-Wmicrosoft-default-arg-redefinition
6180------------------------------------
6181This diagnostic is enabled by default.
6182
6183**Diagnostic text:**
6184
6185+-----------------------------------------------------------------------+
6186|:warning:`warning:` |nbsp| :diagtext:`redefinition of default argument`|
6187+-----------------------------------------------------------------------+
6188
6189
6190-Wmicrosoft-end-of-file
6191-----------------------
6192**Diagnostic text:**
6193
6194+----------------------------------------------------------------------------------------------+
6195|:warning:`warning:` |nbsp| :diagtext:`treating Ctrl-Z as end-of-file is a Microsoft extension`|
6196+----------------------------------------------------------------------------------------------+
6197
6198
6199-Wmicrosoft-enum-forward-reference
6200----------------------------------
Richard Smith66310362017-10-26 21:06:52 +00006201This diagnostic is enabled by default.
6202
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006203**Diagnostic text:**
6204
6205+---------------------------------------------------------------------------------------------------+
6206|:warning:`warning:` |nbsp| :diagtext:`forward references to 'enum' types are a Microsoft extension`|
6207+---------------------------------------------------------------------------------------------------+
6208
6209
6210-Wmicrosoft-enum-value
6211----------------------
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006212**Diagnostic text:**
6213
6214+---------------------------------------------------------------------------------------------------------------------------+
6215|:warning:`warning:` |nbsp| :diagtext:`enumerator value is not representable in the underlying type` |nbsp| :placeholder:`A`|
6216+---------------------------------------------------------------------------------------------------------------------------+
6217
6218
6219-Wmicrosoft-exception-spec
6220--------------------------
6221Some of the diagnostics controlled by this flag are enabled by default.
6222
6223**Diagnostic text:**
6224
6225+------------------------------------------------------------------------------------------------+
6226|:warning:`warning:` |nbsp| :diagtext:`exception specification of '...' is a Microsoft extension`|
6227+------------------------------------------------------------------------------------------------+
6228
6229+---------------------------+----------------------------------+----------------------------------------------------------------------------------------------------------------+
6230|:warning:`warning:` |nbsp| |+--------------------------------+|:diagtext:`incomplete type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`is not allowed in exception specification`|
6231| || || |
6232| |+--------------------------------+| |
6233| ||:diagtext:`pointer to` |nbsp| || |
6234| |+--------------------------------+| |
6235| ||:diagtext:`reference to` |nbsp| || |
6236| |+--------------------------------+| |
6237+---------------------------+----------------------------------+----------------------------------------------------------------------------------------------------------------+
6238
6239+-----------------------------------------------------------------------------------------------------------------+
6240|:warning:`warning:` |nbsp| :diagtext:`exception specification in declaration does not match previous declaration`|
6241+-----------------------------------------------------------------------------------------------------------------+
6242
6243+------------------------------------------------------------------------------------------------------------------------+
6244|:warning:`warning:` |nbsp| :diagtext:`exception specification in explicit instantiation does not match instantiated one`|
6245+------------------------------------------------------------------------------------------------------------------------+
6246
6247+--------------------------------------------------------------------------------------------------------------------------------+
6248|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is missing exception specification '`:placeholder:`B`:diagtext:`'`|
6249+--------------------------------------------------------------------------------------------------------------------------------+
6250
6251+-------------------------------------------------------------------------------------------------------------------+
6252|:warning:`warning:` |nbsp| :diagtext:`exception specification of overriding function is more lax than base version`|
6253+-------------------------------------------------------------------------------------------------------------------+
6254
6255
6256-Wmicrosoft-exists
6257------------------
6258This diagnostic is enabled by default.
6259
6260**Diagnostic text:**
6261
6262+--------------------------------------------------------+---------------------------------+--------------------------------------------+
6263|:warning:`warning:` |nbsp| :diagtext:`dependent` |nbsp| |+-------------------------------+| |nbsp| :diagtext:`declarations are ignored`|
6264| ||:diagtext:`\_\_if\_not\_exists`|| |
6265| |+-------------------------------+| |
6266| ||:diagtext:`\_\_if\_exists` || |
6267| |+-------------------------------+| |
6268+--------------------------------------------------------+---------------------------------+--------------------------------------------+
6269
6270
6271-Wmicrosoft-explicit-constructor-call
6272-------------------------------------
6273This diagnostic is enabled by default.
6274
6275**Diagnostic text:**
6276
6277+-------------------------------------------------------------------------------------------+
6278|:warning:`warning:` |nbsp| :diagtext:`explicit constructor calls are a Microsoft extension`|
6279+-------------------------------------------------------------------------------------------+
6280
6281
6282-Wmicrosoft-extra-qualification
6283-------------------------------
6284This diagnostic is enabled by default.
6285
6286**Diagnostic text:**
6287
6288+--------------------------------------------------------------------------------------------+
6289|:warning:`warning:` |nbsp| :diagtext:`extra qualification on member` |nbsp| :placeholder:`A`|
6290+--------------------------------------------------------------------------------------------+
6291
6292
6293-Wmicrosoft-fixed-enum
6294----------------------
6295**Diagnostic text:**
6296
6297+---------------------------------------------------------------------------------------------------------------+
6298|:warning:`warning:` |nbsp| :diagtext:`enumeration types with a fixed underlying type are a Microsoft extension`|
6299+---------------------------------------------------------------------------------------------------------------+
6300
6301
6302-Wmicrosoft-flexible-array
6303--------------------------
6304**Diagnostic text:**
6305
6306+----------------------------------------------------------------------------------------------------------------------------------+-----------------------+--------------------------------------------+
6307|:warning:`warning:` |nbsp| :diagtext:`flexible array member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in otherwise empty` |nbsp| |+---------------------+| |nbsp| :diagtext:`is a Microsoft extension`|
6308| ||:diagtext:`struct` || |
6309| |+---------------------+| |
6310| ||:diagtext:`interface`|| |
6311| |+---------------------+| |
6312| ||:diagtext:`union` || |
6313| |+---------------------+| |
6314| ||:diagtext:`class` || |
6315| |+---------------------+| |
6316| ||:diagtext:`enum` || |
6317| |+---------------------+| |
6318+----------------------------------------------------------------------------------------------------------------------------------+-----------------------+--------------------------------------------+
6319
6320+-------------------------------------------------------------------------------------------------------------------------------------------+
6321|:warning:`warning:` |nbsp| :diagtext:`flexible array member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in a union is a Microsoft extension`|
6322+-------------------------------------------------------------------------------------------------------------------------------------------+
6323
6324
6325-Wmicrosoft-goto
6326----------------
6327This diagnostic is enabled by default.
6328
6329**Diagnostic text:**
6330
6331+----------------------------------------------------------------------------------------------------------+
6332|:warning:`warning:` |nbsp| :diagtext:`jump from this goto statement to its label is a Microsoft extension`|
6333+----------------------------------------------------------------------------------------------------------+
6334
6335
6336-Wmicrosoft-include
6337-------------------
6338This diagnostic is enabled by default.
6339
6340**Diagnostic text:**
6341
6342+------------------------------------------------------------------------------------------------------------------------------+
6343|:warning:`warning:` |nbsp| :diagtext:`#include resolved using non-portable Microsoft search rules as:` |nbsp| :placeholder:`A`|
6344+------------------------------------------------------------------------------------------------------------------------------+
6345
6346
6347-Wmicrosoft-mutable-reference
6348-----------------------------
6349This diagnostic is enabled by default.
6350
6351**Diagnostic text:**
6352
6353+---------------------------------------------------------------------------------------------+
6354|:warning:`warning:` |nbsp| :diagtext:`'mutable' on a reference type is a Microsoft extension`|
6355+---------------------------------------------------------------------------------------------+
6356
6357
6358-Wmicrosoft-pure-definition
6359---------------------------
6360This diagnostic is enabled by default.
6361
6362**Diagnostic text:**
6363
6364+-------------------------------------------------------------------------------------------------------+
6365|:warning:`warning:` |nbsp| :diagtext:`function definition with pure-specifier is a Microsoft extension`|
6366+-------------------------------------------------------------------------------------------------------+
6367
6368
6369-Wmicrosoft-redeclare-static
6370----------------------------
6371**Diagnostic text:**
6372
6373+-------------------------------------------------------------------------------------------------------------------------------------------+
6374|:warning:`warning:` |nbsp| :diagtext:`redeclaring non-static` |nbsp| :placeholder:`A` |nbsp| :diagtext:`as static is a Microsoft extension`|
6375+-------------------------------------------------------------------------------------------------------------------------------------------+
6376
6377
6378-Wmicrosoft-sealed
6379------------------
6380This diagnostic is enabled by default.
6381
6382**Diagnostic text:**
6383
6384+--------------------------------------------------------------------------------+
6385|:warning:`warning:` |nbsp| :diagtext:`'sealed' keyword is a Microsoft extension`|
6386+--------------------------------------------------------------------------------+
6387
6388
6389-Wmicrosoft-template
6390--------------------
6391This diagnostic is enabled by default.
6392
6393**Diagnostic text:**
6394
6395+------------------------------------------------------------------------------------------------------------------------------------------------------+
6396|:warning:`warning:` |nbsp| :diagtext:`duplicate explicit instantiation of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`ignored as a Microsoft extension`|
6397+------------------------------------------------------------------------------------------------------------------------------------------------------+
6398
6399+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6400|:warning:`warning:` |nbsp| :diagtext:`use of identifier` |nbsp| :placeholder:`A` |nbsp| :diagtext:`found via unqualified lookup into dependent bases of class templates is a Microsoft extension`|
6401+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6402
6403+--------------------------------------------------------------------------------------------------------------------------------------------------------+
6404|:warning:`warning:` |nbsp| :diagtext:`explicit specialization of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`within class scope is a Microsoft extension`|
6405+--------------------------------------------------------------------------------------------------------------------------------------------------------+
6406
6407+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6408|:warning:`warning:` |nbsp| :diagtext:`using the undeclared type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`as a default template argument is a Microsoft extension`|
6409+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6410
6411+-----------------------------------------------------------------------------------------------------------------------------+
6412|:warning:`warning:` |nbsp| :diagtext:`non-type template argument containing a dereference operation is a Microsoft extension`|
6413+-----------------------------------------------------------------------------------------------------------------------------+
6414
6415+---------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6416|:warning:`warning:` |nbsp| |+-------------------------------------+| |nbsp| :diagtext:`specialization of` |nbsp| :placeholder:`B` |nbsp| :diagtext:`outside namespace enclosing` |nbsp| :placeholder:`C` |nbsp| :diagtext:`is a Microsoft extension`|
6417| ||:diagtext:`class template` || |
6418| |+-------------------------------------+| |
6419| ||:diagtext:`class template partial` || |
6420| |+-------------------------------------+| |
6421| ||:diagtext:`variable template` || |
6422| |+-------------------------------------+| |
6423| ||:diagtext:`variable template partial`|| |
6424| |+-------------------------------------+| |
6425| ||:diagtext:`function template` || |
6426| |+-------------------------------------+| |
6427| ||:diagtext:`member function` || |
6428| |+-------------------------------------+| |
6429| ||:diagtext:`static data member` || |
6430| |+-------------------------------------+| |
6431| ||:diagtext:`member class` || |
6432| |+-------------------------------------+| |
6433| ||:diagtext:`member enumeration` || |
6434| |+-------------------------------------+| |
6435+---------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6436
6437+------------------------------------------------------------------------------------------------------------------------------------------------+
6438|:warning:`warning:` |nbsp| :diagtext:`template argument for template type parameter must be a type; omitted 'typename' is a Microsoft extension`|
6439+------------------------------------------------------------------------------------------------------------------------------------------------+
6440
6441+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6442|:warning:`warning:` |nbsp| :diagtext:`use of undeclared identifier` |nbsp| :placeholder:`A`:diagtext:`; unqualified lookup into dependent bases of class template` |nbsp| :placeholder:`B` |nbsp| :diagtext:`is a Microsoft extension`|
6443+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6444
6445
6446-Wmicrosoft-union-member-reference
6447----------------------------------
6448This diagnostic is enabled by default.
6449
6450**Diagnostic text:**
6451
6452+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6453|:warning:`warning:` |nbsp| :diagtext:`union member` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has reference type` |nbsp| :placeholder:`B`:diagtext:`, which is a Microsoft extension`|
6454+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6455
6456
6457-Wmicrosoft-unqualified-friend
6458------------------------------
6459This diagnostic is enabled by default.
6460
6461**Diagnostic text:**
6462
6463+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6464|:warning:`warning:` |nbsp| :diagtext:`unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier`|
6465+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6466
6467
6468-Wmicrosoft-using-decl
6469----------------------
6470This diagnostic is enabled by default.
6471
6472**Diagnostic text:**
6473
6474+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6475|:warning:`warning:` |nbsp| :diagtext:`using declaration referring to inaccessible member '`:placeholder:`A`:diagtext:`' (which refers to accessible member '`:placeholder:`B`:diagtext:`') is a Microsoft compatibility extension`|
6476+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6477
6478
6479-Wmicrosoft-void-pseudo-dtor
6480----------------------------
6481This diagnostic is enabled by default.
6482
6483**Diagnostic text:**
6484
6485+------------------------------------------------------------------------------------------------+
6486|:warning:`warning:` |nbsp| :diagtext:`pseudo-destructors on type void are a Microsoft extension`|
6487+------------------------------------------------------------------------------------------------+
6488
6489
6490-Wmismatched-new-delete
6491-----------------------
6492This diagnostic is enabled by default.
6493
6494**Diagnostic text:**
6495
6496+----------------------------------------------+------------------+---------------------------------------------------------------+------------------+-----------------------------------+------------------+--------------+
6497|:warning:`warning:` |nbsp| :diagtext:`'delete`|+----------------+|:diagtext:`' applied to a pointer that was allocated with 'new`|+----------------+|:diagtext:`'; did you mean 'delete`|+----------------+|:diagtext:`'?`|
6498| || || ||:diagtext:`\[\]`|| ||:diagtext:`\[\]`|| |
6499| |+----------------+| |+----------------+| |+----------------+| |
6500| ||:diagtext:`\[\]`|| || || || || |
6501| |+----------------+| |+----------------+| |+----------------+| |
6502+----------------------------------------------+------------------+---------------------------------------------------------------+------------------+-----------------------------------+------------------+--------------+
6503
6504
6505-Wmismatched-parameter-types
6506----------------------------
6507This diagnostic is enabled by default.
6508
6509**Diagnostic text:**
6510
6511+---------------------------------------------------------------------------------------------------------------+
6512|:warning:`warning:` |nbsp| :diagtext:`conflicting parameter types in implementation of` |nbsp| :placeholder:`A`|
6513+---------------------------------------------------------------------------------------------------------------+
6514
6515
6516-Wmismatched-return-types
6517-------------------------
6518This diagnostic is enabled by default.
6519
6520**Diagnostic text:**
6521
6522+-----------------------------------------------------------------------------------------------------------+
6523|:warning:`warning:` |nbsp| :diagtext:`conflicting return type in implementation of` |nbsp| :placeholder:`A`|
6524+-----------------------------------------------------------------------------------------------------------+
6525
6526
6527-Wmismatched-tags
6528-----------------
6529**Diagnostic text:**
6530
6531+---------------------------------------------------------------------------------+--------------------------+------------------------------+-----------------------------------------------------------+--------------------------+------------------------------+
6532|:warning:`warning:` |nbsp| :placeholder:`C` |nbsp| :diagtext:`defined as` |nbsp| |+------------------------+|+----------------------------+| |nbsp| :diagtext:`here but previously declared as` |nbsp| |+------------------------+|+----------------------------+|
6533| ||:diagtext:`a struct` ||| || ||:diagtext:`a struct` ||| ||
6534| |+------------------------+|+----------------------------+| |+------------------------+|+----------------------------+|
6535| ||:diagtext:`an interface`||| |nbsp| :diagtext:`template`|| ||:diagtext:`an interface`||| |nbsp| :diagtext:`template`||
6536| |+------------------------+|+----------------------------+| |+------------------------+|+----------------------------+|
6537| ||:diagtext:`a class` || | ||:diagtext:`a class` || |
6538| |+------------------------+| | |+------------------------+| |
6539+---------------------------------------------------------------------------------+--------------------------+------------------------------+-----------------------------------------------------------+--------------------------+------------------------------+
6540
6541+---------------------------+-----------------------+------------------------------+--------------------------------------------------------------------------------+-----------------------+------------------------------+
6542|:warning:`warning:` |nbsp| |+---------------------+|+----------------------------+| |nbsp| :placeholder:`C` |nbsp| :diagtext:`was previously declared as a` |nbsp| |+---------------------+|+----------------------------+|
6543| ||:diagtext:`struct` ||| || ||:diagtext:`struct` ||| ||
6544| |+---------------------+|+----------------------------+| |+---------------------+|+----------------------------+|
6545| ||:diagtext:`interface`||| |nbsp| :diagtext:`template`|| ||:diagtext:`interface`||| |nbsp| :diagtext:`template`||
6546| |+---------------------+|+----------------------------+| |+---------------------+|+----------------------------+|
6547| ||:diagtext:`class` || | ||:diagtext:`class` || |
6548| |+---------------------+| | |+---------------------+| |
6549+---------------------------+-----------------------+------------------------------+--------------------------------------------------------------------------------+-----------------------+------------------------------+
6550
6551
6552-Wmissing-braces
6553----------------
6554**Diagnostic text:**
6555
6556+----------------------------------------------------------------------------------------+
6557|:warning:`warning:` |nbsp| :diagtext:`suggest braces around initialization of subobject`|
6558+----------------------------------------------------------------------------------------+
6559
6560
6561-Wmissing-declarations
6562----------------------
6563This diagnostic is enabled by default.
6564
6565**Diagnostic text:**
6566
6567+----------------------------------------------------------------------------+
6568|:warning:`warning:` |nbsp| :diagtext:`declaration does not declare anything`|
6569+----------------------------------------------------------------------------+
6570
6571+-----------------------------------------------------------------------------------------------------------------+
6572|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' is not permitted on a declaration of a type`|
6573+-----------------------------------------------------------------------------------------------------------------+
6574
6575+--------------------------------------------------------------+
6576|:warning:`warning:` |nbsp| :diagtext:`typedef requires a name`|
6577+--------------------------------------------------------------+
6578
6579+-------------------------------------------------------------------------------------------------+
6580|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' ignored on this declaration`|
6581+-------------------------------------------------------------------------------------------------+
6582
6583
6584-Wmissing-exception-spec
6585------------------------
6586This diagnostic is enabled by default.
6587
6588**Diagnostic text:**
6589
6590+--------------------------------------------------------------------------------------------------------------------------------+
6591|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is missing exception specification '`:placeholder:`B`:diagtext:`'`|
6592+--------------------------------------------------------------------------------------------------------------------------------+
6593
6594
6595-Wmissing-field-initializers
6596----------------------------
6597**Diagnostic text:**
6598
6599+-----------------------------------------------------------------------------------------------------------+
6600|:warning:`warning:` |nbsp| :diagtext:`missing field` |nbsp| :placeholder:`A` |nbsp| :diagtext:`initializer`|
6601+-----------------------------------------------------------------------------------------------------------+
6602
6603
6604-Wmissing-format-attribute
6605--------------------------
6606This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
6607
6608-Wmissing-include-dirs
6609----------------------
6610This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
6611
6612-Wmissing-method-return-type
6613----------------------------
6614**Diagnostic text:**
6615
6616+--------------------------------------------------------------------------------------------+
6617|:warning:`warning:` |nbsp| :diagtext:`method has no return type specified; defaults to 'id'`|
6618+--------------------------------------------------------------------------------------------+
6619
6620
Richard Smith66310362017-10-26 21:06:52 +00006621-Wmissing-noescape
6622------------------
6623This diagnostic is enabled by default.
6624
6625**Diagnostic text:**
6626
6627+----------------------------------------------------------------------------------------------------------------------------+
6628|:warning:`warning:` |nbsp| :diagtext:`parameter of overriding method should be annotated with \_\_attribute\_\_((noescape))`|
6629+----------------------------------------------------------------------------------------------------------------------------+
6630
6631
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006632-Wmissing-noreturn
6633------------------
6634**Diagnostic text:**
6635
6636+----------------------------------------------------------------------------------------+
6637|:warning:`warning:` |nbsp| :diagtext:`block could be declared with attribute 'noreturn'`|
6638+----------------------------------------------------------------------------------------+
6639
6640+---------------------------+----------------------+---------------------------------------------------------------------------------------+
6641|:warning:`warning:` |nbsp| |+--------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`could be declared with attribute 'noreturn'`|
6642| ||:diagtext:`function`|| |
6643| |+--------------------+| |
6644| ||:diagtext:`method` || |
6645| |+--------------------+| |
6646+---------------------------+----------------------+---------------------------------------------------------------------------------------+
6647
6648
6649-Wmissing-prototype-for-cc
6650--------------------------
6651This diagnostic is enabled by default.
6652
6653**Diagnostic text:**
6654
6655+----------------------------------------------------------------------------------------------------------------------------------------------+
6656|:warning:`warning:` |nbsp| :diagtext:`function with no prototype cannot use the` |nbsp| :placeholder:`A` |nbsp| :diagtext:`calling convention`|
6657+----------------------------------------------------------------------------------------------------------------------------------------------+
6658
6659
6660-Wmissing-prototypes
6661--------------------
6662**Diagnostic text:**
6663
6664+-------------------------------------------------------------------------------------------------+
6665|:warning:`warning:` |nbsp| :diagtext:`no previous prototype for function` |nbsp| :placeholder:`A`|
6666+-------------------------------------------------------------------------------------------------+
6667
6668
6669-Wmissing-selector-name
6670-----------------------
6671This diagnostic is enabled by default.
6672
6673**Diagnostic text:**
6674
6675+---------------------------------------------------------------------------------------------------------------------------------------------+
6676|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`used as the name of the previous parameter rather than as part of the selector`|
6677+---------------------------------------------------------------------------------------------------------------------------------------------+
6678
6679
6680-Wmissing-sysroot
6681-----------------
6682This diagnostic is enabled by default.
6683
6684**Diagnostic text:**
6685
6686+------------------------------------------------------------------------------------------------+
6687|:warning:`warning:` |nbsp| :diagtext:`no such sysroot directory: '`:placeholder:`A`:diagtext:`'`|
6688+------------------------------------------------------------------------------------------------+
6689
6690
6691-Wmissing-variable-declarations
6692-------------------------------
6693**Diagnostic text:**
6694
6695+---------------------------------------------------------------------------------------------------------------------+
6696|:warning:`warning:` |nbsp| :diagtext:`no previous extern declaration for non-static variable` |nbsp| :placeholder:`A`|
6697+---------------------------------------------------------------------------------------------------------------------+
6698
6699
6700-Rmodule-build
6701--------------
6702**Diagnostic text:**
6703
6704+---------------------------------------------------------------------------------------------------------------------+
6705|:remark:`remark:` |nbsp| :diagtext:`building module '`:placeholder:`A`:diagtext:`' as '`:placeholder:`B`:diagtext:`'`|
6706+---------------------------------------------------------------------------------------------------------------------+
6707
6708+--------------------------------------------------------------------------------------------+
6709|:remark:`remark:` |nbsp| :diagtext:`finished building module '`:placeholder:`A`:diagtext:`'`|
6710+--------------------------------------------------------------------------------------------+
6711
Richard Smith9a016602017-04-13 22:44:22 +00006712+-----------------------------------------------------------------------------------------------------------------------------------+
6713|:remark:`remark:` |nbsp| :diagtext:`could not acquire lock file for module '`:placeholder:`A`:diagtext:`':` |nbsp| :placeholder:`B`|
6714+-----------------------------------------------------------------------------------------------------------------------------------+
6715
6716+---------------------------------------------------------------------------------------------------------------------+
6717|:remark:`remark:` |nbsp| :diagtext:`timed out waiting to acquire lock file for module '`:placeholder:`A`:diagtext:`'`|
6718+---------------------------------------------------------------------------------------------------------------------+
6719
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006720
6721-Wmodule-conflict
6722-----------------
6723This diagnostic is enabled by default.
6724
6725**Diagnostic text:**
6726
6727+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6728|:warning:`warning:` |nbsp| :diagtext:`module '`:placeholder:`A`:diagtext:`' conflicts with already-imported module '`:placeholder:`B`:diagtext:`':` |nbsp| :placeholder:`C`|
6729+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6730
Richard Smith9a016602017-04-13 22:44:22 +00006731+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6732|:warning:`warning:` |nbsp| :diagtext:`module file '`:placeholder:`A`:diagtext:`' was validated as a system module and is now being imported as a non-system module; any difference in diagnostic options will be ignored`|
6733+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6734
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006735
6736-Wmodule-file-config-mismatch
6737-----------------------------
6738This diagnostic is an error by default, but the flag ``-Wno-module-file-config-mismatch`` can be used to disable the error.
6739
6740**Diagnostic text:**
6741
6742+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6743|:error:`error:` |nbsp| :diagtext:`module file` |nbsp| :placeholder:`A` |nbsp| :diagtext:`cannot be loaded due to a configuration mismatch with the current compilation`|
6744+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6745
6746
6747-Wmodule-file-extension
6748-----------------------
6749This diagnostic is enabled by default.
6750
6751**Diagnostic text:**
6752
6753+----------------------------------------------------------------------------------------------------------------+
6754|:warning:`warning:` |nbsp| :diagtext:`duplicate module file extension block name '`:placeholder:`A`:diagtext:`'`|
6755+----------------------------------------------------------------------------------------------------------------+
6756
6757
6758-Wmodule-import-in-extern-c
6759---------------------------
6760This diagnostic is an error by default, but the flag ``-Wno-module-import-in-extern-c`` can be used to disable the error.
6761
6762**Diagnostic text:**
6763
6764+-----------------------------------------------------------------------------------------------------------------------------------------------+
6765|:error:`error:` |nbsp| :diagtext:`import of C++ module '`:placeholder:`A`:diagtext:`' appears within extern "C" language linkage specification`|
6766+-----------------------------------------------------------------------------------------------------------------------------------------------+
6767
6768
6769-Wmodules-ambiguous-internal-linkage
6770------------------------------------
6771This diagnostic is enabled by default.
6772
6773**Diagnostic text:**
6774
6775+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
6776|:warning:`warning:` |nbsp| :diagtext:`ambiguous use of internal linkage declaration` |nbsp| :placeholder:`A` |nbsp| :diagtext:`defined in multiple modules`|
6777+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
6778
6779
6780-Wmodules-import-nested-redundant
6781---------------------------------
6782This diagnostic is an error by default, but the flag ``-Wno-modules-import-nested-redundant`` can be used to disable the error.
6783
6784**Diagnostic text:**
6785
6786+-------------------------------------------------------------------------------------------------------------------------------------+
6787|:error:`error:` |nbsp| :diagtext:`redundant #include of module '`:placeholder:`A`:diagtext:`' appears within` |nbsp| :placeholder:`B`|
6788+-------------------------------------------------------------------------------------------------------------------------------------+
6789
6790
6791-Wmost
6792------
6793Some of the diagnostics controlled by this flag are enabled by default.
6794
Richard Smith66310362017-10-26 21:06:52 +00006795Controls `-Wcast-of-sel-type`_, `-Wchar-subscripts`_, `-Wcomment`_, `-Wdelete-non-virtual-dtor`_, `-Wextern-c-compat`_, `-Wfor-loop-analysis`_, `-Wformat`_, `-Wimplicit`_, `-Winfinite-recursion`_, `-Wmismatched-tags`_, `-Wmissing-braces`_, `-Wmove`_, `-Wmultichar`_, `-Wobjc-designated-initializers`_, `-Wobjc-flexible-array`_, `-Wobjc-missing-super-calls`_, `-Woverloaded-virtual`_, `-Wprivate-extern`_, `-Wreorder`_, `-Wreturn-type`_, `-Wself-assign`_, `-Wself-move`_, `-Wsizeof-array-argument`_, `-Wsizeof-array-decay`_, `-Wstring-plus-int`_, `-Wtrigraphs`_, `-Wuninitialized`_, `-Wunknown-pragmas`_, `-Wunused`_, `-Wuser-defined-warnings`_, `-Wvolatile-register-var`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006796
6797
6798-Wmove
6799------
6800Controls `-Wpessimizing-move`_, `-Wredundant-move`_, `-Wself-move`_.
6801
6802
6803-Wmsvc-include
6804--------------
6805Synonym for `-Wmicrosoft-include`_.
6806
6807
Richard Smith9a016602017-04-13 22:44:22 +00006808-Wmsvc-not-found
6809----------------
6810This diagnostic is enabled by default.
6811
6812**Diagnostic text:**
6813
6814+-------------------------------------------------------------------------------------------------------------------------------------+
6815|:warning:`warning:` |nbsp| :diagtext:`unable to find a Visual Studio installation; try running Clang from a developer command prompt`|
6816+-------------------------------------------------------------------------------------------------------------------------------------+
6817
6818
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006819-Wmultichar
6820-----------
6821This diagnostic is enabled by default.
6822
6823**Diagnostic text:**
6824
6825+-------------------------------------------------------------------------+
6826|:warning:`warning:` |nbsp| :diagtext:`multi-character character constant`|
6827+-------------------------------------------------------------------------+
6828
6829
6830-Wmultiple-move-vbase
6831---------------------
6832This diagnostic is enabled by default.
6833
6834**Diagnostic text:**
6835
6836+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6837|:warning:`warning:` |nbsp| :diagtext:`defaulted move assignment operator of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`will move assign virtual base class` |nbsp| :placeholder:`B` |nbsp| :diagtext:`multiple times`|
6838+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
6839
6840
6841-Wnarrowing
6842-----------
6843Synonym for `-Wc++11-narrowing`_.
6844
6845
6846-Wnested-anon-types
6847-------------------
6848**Diagnostic text:**
6849
6850+---------------------------------------------------------------------------------------+--------------------+------------------------------------+
6851|:warning:`warning:` |nbsp| :diagtext:`anonymous types declared in an anonymous` |nbsp| |+------------------+| |nbsp| :diagtext:`are an extension`|
6852| ||:diagtext:`struct`|| |
6853| |+------------------+| |
6854| ||:diagtext:`union` || |
6855| |+------------------+| |
6856+---------------------------------------------------------------------------------------+--------------------+------------------------------------+
6857
6858
6859-Wnested-externs
6860----------------
6861This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
6862
6863-Wnew-returns-null
6864------------------
6865This diagnostic is enabled by default.
6866
6867**Diagnostic text:**
6868
6869+-------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
6870|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`should not return a null pointer unless it is declared 'throw()'`|+---------------------------------+|
6871| || ||
6872| |+---------------------------------+|
6873| || |nbsp| :diagtext:`or 'noexcept'`||
6874| |+---------------------------------+|
6875+-------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+
6876
6877
6878-Wnewline-eof
6879-------------
6880**Diagnostic text:**
6881
6882+----------------------------------------------------------------+
6883|:warning:`warning:` |nbsp| :diagtext:`no newline at end of file`|
6884+----------------------------------------------------------------+
6885
6886+----------------------------------------------------------------+
6887|:warning:`warning:` |nbsp| :diagtext:`no newline at end of file`|
6888+----------------------------------------------------------------+
6889
6890
Richard Smith66310362017-10-26 21:06:52 +00006891-Wnoexcept-type
6892---------------
6893Synonym for `-Wc++17-compat-mangling`_.
6894
6895
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006896-Wnon-gcc
6897---------
6898Some of the diagnostics controlled by this flag are enabled by default.
6899
Richard Smith8cba2912016-09-14 01:55:42 +00006900Controls `-Wconversion`_, `-Wliteral-range`_, `-Wsign-compare`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006901
6902
6903-Wnon-literal-null-conversion
6904-----------------------------
6905This diagnostic is enabled by default.
6906
6907**Diagnostic text:**
6908
6909+--------------------------------------------------------------------------------------------------------------------------------------------+
6910|:warning:`warning:` |nbsp| :diagtext:`expression which evaluates to zero treated as a null pointer constant of type` |nbsp| :placeholder:`A`|
6911+--------------------------------------------------------------------------------------------------------------------------------------------+
6912
6913
6914-Wnon-modular-include-in-framework-module
6915-----------------------------------------
6916**Diagnostic text:**
6917
Richard Smithcf9f4222017-01-20 19:27:09 +00006918+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
6919|:warning:`warning:` |nbsp| :diagtext:`include of non-modular header inside framework module '`:placeholder:`A`:diagtext:`': '`:placeholder:`B`:diagtext:`'`|
6920+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006921
6922
6923-Wnon-modular-include-in-module
6924-------------------------------
6925Also controls `-Wnon-modular-include-in-framework-module`_.
6926
6927**Diagnostic text:**
6928
Richard Smithcf9f4222017-01-20 19:27:09 +00006929+-------------------------------------------------------------------------------------------------------------------------------------------------+
6930|:warning:`warning:` |nbsp| :diagtext:`include of non-modular header inside module '`:placeholder:`A`:diagtext:`': '`:placeholder:`B`:diagtext:`'`|
6931+-------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00006932
6933
6934-Wnon-pod-varargs
6935-----------------
6936This diagnostic is an error by default, but the flag ``-Wno-non-pod-varargs`` can be used to disable the error.
6937
6938**Diagnostic text:**
6939
6940+----------------------------------------------------------------+-------------------------+--------------------------------------------------------------------------------------------+-------------------------+----------------------------------------+
6941|:error:`error:` |nbsp| :diagtext:`cannot pass object of` |nbsp| |+-----------------------+| |nbsp| :diagtext:`type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`through variadic` |nbsp| |+-----------------------+|:diagtext:`; call will abort at runtime`|
6942| ||:diagtext:`non-POD` || ||:diagtext:`function` || |
6943| |+-----------------------+| |+-----------------------+| |
6944| ||:diagtext:`non-trivial`|| ||:diagtext:`block` || |
6945| |+-----------------------+| |+-----------------------+| |
6946| | | ||:diagtext:`method` || |
6947| | | |+-----------------------+| |
6948| | | ||:diagtext:`constructor`|| |
6949| | | |+-----------------------+| |
6950+----------------------------------------------------------------+-------------------------+--------------------------------------------------------------------------------------------+-------------------------+----------------------------------------+
6951
6952+------------------------------------------------------+-------------------------+-------------------------------------------------------------------------------------------------+-------------------------+--------------------------------------------------------------------------+
6953|:error:`error:` |nbsp| :diagtext:`cannot pass` |nbsp| |+-----------------------+| |nbsp| :diagtext:`object of type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`to variadic` |nbsp| |+-----------------------+|:diagtext:`; expected type from format string was` |nbsp| :placeholder:`D`|
6954| ||:diagtext:`non-POD` || ||:diagtext:`function` || |
6955| |+-----------------------+| |+-----------------------+| |
6956| ||:diagtext:`non-trivial`|| ||:diagtext:`block` || |
6957| |+-----------------------+| |+-----------------------+| |
6958| | | ||:diagtext:`method` || |
6959| | | |+-----------------------+| |
6960| | | ||:diagtext:`constructor`|| |
6961| | | |+-----------------------+| |
6962+------------------------------------------------------+-------------------------+-------------------------------------------------------------------------------------------------+-------------------------+--------------------------------------------------------------------------+
6963
6964+----------------------------------------------------------------------------------------------------------+
6965|:error:`error:` |nbsp| :diagtext:`second argument to 'va\_arg' is of non-POD type` |nbsp| :placeholder:`A`|
6966+----------------------------------------------------------------------------------------------------------+
6967
6968+--------------------------------------------------------------------------------------------------------------------------+
6969|:error:`error:` |nbsp| :diagtext:`second argument to 'va\_arg' is of ARC ownership-qualified type` |nbsp| :placeholder:`A`|
6970+--------------------------------------------------------------------------------------------------------------------------+
6971
6972
6973-Wnon-virtual-dtor
6974------------------
6975**Diagnostic text:**
6976
6977+---------------------------------------------------------------------------------------------------------------+
6978|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has virtual functions but non-virtual destructor`|
6979+---------------------------------------------------------------------------------------------------------------+
6980
6981
6982-Wnonnull
6983---------
6984This diagnostic is enabled by default.
6985
6986**Diagnostic text:**
6987
6988+------------------------------------------------------------------------------------------------+
6989|:warning:`warning:` |nbsp| :diagtext:`null passed to a callee that requires a non-null argument`|
6990+------------------------------------------------------------------------------------------------+
6991
6992+-----------------------------------------------------------------+----------------------+---------------------------------------------------------+
6993|:warning:`warning:` |nbsp| :diagtext:`null returned from` |nbsp| |+--------------------+| |nbsp| :diagtext:`that requires a non-null return value`|
6994| ||:diagtext:`function`|| |
6995| |+--------------------+| |
6996| ||:diagtext:`method` || |
6997| |+--------------------+| |
6998+-----------------------------------------------------------------+----------------------+---------------------------------------------------------+
6999
7000
7001-Wnonportable-cfstrings
7002-----------------------
7003This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
7004
7005-Wnonportable-include-path
7006--------------------------
7007This diagnostic is enabled by default.
7008
7009**Diagnostic text:**
7010
7011+------------------------------------------------------------------------------------------------------------------------------------------------------+
7012|:warning:`warning:` |nbsp| :diagtext:`non-portable path to file '`:placeholder:`A`:diagtext:`'; specified path differs in case from file name on disk`|
7013+------------------------------------------------------------------------------------------------------------------------------------------------------+
7014
7015
7016-Wnonportable-system-include-path
7017---------------------------------
7018**Diagnostic text:**
7019
7020+------------------------------------------------------------------------------------------------------------------------------------------------------+
7021|:warning:`warning:` |nbsp| :diagtext:`non-portable path to file '`:placeholder:`A`:diagtext:`'; specified path differs in case from file name on disk`|
7022+------------------------------------------------------------------------------------------------------------------------------------------------------+
7023
7024
7025-Wnonportable-vector-initialization
7026-----------------------------------
7027This diagnostic is enabled by default.
7028
7029**Diagnostic text:**
7030
7031+---------------------------------------------------------------------------------------------------------------------+
7032|:warning:`warning:` |nbsp| :diagtext:`vector initializers are not compatible with NEON intrinsics in big endian mode`|
7033+---------------------------------------------------------------------------------------------------------------------+
7034
7035
Richard Smith66310362017-10-26 21:06:52 +00007036-Wnsconsumed-mismatch
7037---------------------
7038This diagnostic is enabled by default.
7039
7040**Diagnostic text:**
7041
7042+---------------------------------------------------------------------------------------------------------------+
7043|:warning:`warning:` |nbsp| :diagtext:`overriding method has mismatched ns\_consumed attribute on its parameter`|
7044+---------------------------------------------------------------------------------------------------------------+
7045
7046
7047-Wnsreturns-mismatch
7048--------------------
7049This diagnostic is enabled by default.
7050
7051**Diagnostic text:**
7052
7053+-------------------------------------------------------------------------------------+---------------------------+------------------------------+
7054|:warning:`warning:` |nbsp| :diagtext:`overriding method has mismatched ns\_returns\_`|+-------------------------+| |nbsp| :diagtext:`attributes`|
7055| ||:diagtext:`not\_retained`|| |
7056| |+-------------------------+| |
7057| ||:diagtext:`retained` || |
7058| |+-------------------------+| |
7059+-------------------------------------------------------------------------------------+---------------------------+------------------------------+
7060
7061
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007062-Wnull-arithmetic
7063-----------------
7064This diagnostic is enabled by default.
7065
7066**Diagnostic text:**
7067
7068+--------------------------------------------------------------------------+
7069|:warning:`warning:` |nbsp| :diagtext:`use of NULL in arithmetic operation`|
7070+--------------------------------------------------------------------------+
7071
7072+--------------------------------------------------------------------------------------+--------------------------------------------------------------+
7073|:warning:`warning:` |nbsp| :diagtext:`comparison between NULL and non-pointer` |nbsp| |+------------------------------------------------------------+|
7074| ||+----------------------------------------------------------+||
7075| |||:diagtext:`(`:placeholder:`B` |nbsp| :diagtext:`and NULL)`|||
7076| ||+----------------------------------------------------------+||
7077| |+------------------------------------------------------------+|
7078| ||+----------------------------------------------------------+||
7079| |||:diagtext:`(NULL and` |nbsp| :placeholder:`B`:diagtext:`)`|||
7080| ||+----------------------------------------------------------+||
7081| |+------------------------------------------------------------+|
7082+--------------------------------------------------------------------------------------+--------------------------------------------------------------+
7083
7084
7085-Wnull-character
7086----------------
7087This diagnostic is enabled by default.
7088
7089**Diagnostic text:**
7090
7091+-----------------------------------------------------------------------------+--------------------+---------------------------+
7092|:warning:`warning:` |nbsp| :diagtext:`null character(s) preserved in` |nbsp| |+------------------+| |nbsp| :diagtext:`literal`|
7093| ||:diagtext:`char` || |
7094| |+------------------+| |
7095| ||:diagtext:`string`|| |
7096| |+------------------+| |
7097+-----------------------------------------------------------------------------+--------------------+---------------------------+
7098
7099+-------------------------------------------------------------+
7100|:warning:`warning:` |nbsp| :diagtext:`null character ignored`|
7101+-------------------------------------------------------------+
7102
7103
7104-Wnull-conversion
7105-----------------
7106This diagnostic is enabled by default.
7107
7108**Diagnostic text:**
7109
7110+---------------------------------------------------------------------+---------------------+-------------------------------------------------------+
7111|:warning:`warning:` |nbsp| :diagtext:`implicit conversion of` |nbsp| |+-------------------+| |nbsp| :diagtext:`constant to` |nbsp| :placeholder:`B`|
7112| ||:diagtext:`NULL` || |
7113| |+-------------------+| |
7114| ||:diagtext:`nullptr`|| |
7115| |+-------------------+| |
7116+---------------------------------------------------------------------+---------------------+-------------------------------------------------------+
7117
7118
7119-Wnull-dereference
7120------------------
7121This diagnostic is enabled by default.
7122
7123**Diagnostic text:**
7124
7125+------------------------------------------------------------------------------------------------------------+
7126|:warning:`warning:` |nbsp| :diagtext:`binding dereferenced null pointer to reference has undefined behavior`|
7127+------------------------------------------------------------------------------------------------------------+
7128
7129+---------------------------------------------------------------------------------------------------------+
7130|:warning:`warning:` |nbsp| :diagtext:`indirection of non-volatile null pointer will be deleted, not trap`|
7131+---------------------------------------------------------------------------------------------------------+
7132
7133
Richard Smith66310362017-10-26 21:06:52 +00007134-Wnull-pointer-arithmetic
7135-------------------------
7136**Diagnostic text:**
7137
7138+--------------------------------------------------------------------------------------------------------------------------------+
7139|:warning:`warning:` |nbsp| :diagtext:`arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension`|
7140+--------------------------------------------------------------------------------------------------------------------------------+
7141
7142+-------------------------------------------------------------------------------------------------------------+----------------------------------------------+
7143|:warning:`warning:` |nbsp| :diagtext:`performing pointer arithmetic on a null pointer has undefined behavior`|+--------------------------------------------+|
7144| || ||
7145| |+--------------------------------------------+|
7146| || |nbsp| :diagtext:`if the offset is nonzero`||
7147| |+--------------------------------------------+|
7148+-------------------------------------------------------------------------------------------------------------+----------------------------------------------+
7149
7150
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007151-Wnullability
7152-------------
7153This diagnostic is enabled by default.
7154
7155**Diagnostic text:**
7156
7157+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7158|:warning:`warning:` |nbsp| :diagtext:`conflicting nullability specifier on parameter types,` |nbsp| :placeholder:`A` |nbsp| :diagtext:`conflicts with existing specifier` |nbsp| :placeholder:`B`|
7159+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7160
7161+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7162|:warning:`warning:` |nbsp| :diagtext:`conflicting nullability specifier on return types,` |nbsp| :placeholder:`A` |nbsp| :diagtext:`conflicts with existing specifier` |nbsp| :placeholder:`B`|
7163+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7164
7165+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
7166|:warning:`warning:` |nbsp| :diagtext:`nullability specifier` |nbsp| :placeholder:`A` |nbsp| :diagtext:`conflicts with existing specifier` |nbsp| :placeholder:`B`|
7167+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
7168
7169+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7170|:warning:`warning:` |nbsp| :diagtext:`synthesized setter` |nbsp| :placeholder:`A` |nbsp| :diagtext:`for null\_resettable property` |nbsp| :placeholder:`B` |nbsp| :diagtext:`does not handle nil`|
7171+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7172
7173+----------------------------------------------------------------------------------------------+
7174|:warning:`warning:` |nbsp| :diagtext:`duplicate nullability specifier` |nbsp| :placeholder:`A`|
7175+----------------------------------------------------------------------------------------------+
7176
7177
7178-Wnullability-completeness
7179--------------------------
7180This diagnostic is enabled by default.
7181
Richard Smithcf9f4222017-01-20 19:27:09 +00007182Also controls `-Wnullability-completeness-on-arrays`_.
7183
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007184**Diagnostic text:**
7185
7186+---------------------------+----------------------------+-----------------------------------------------------------------------------------------------------------+
7187|:warning:`warning:` |nbsp| |+--------------------------+| |nbsp| :diagtext:`is missing a nullability type specifier (\_Nonnull, \_Nullable, or \_Null\_unspecified)`|
7188| ||:diagtext:`pointer` || |
7189| |+--------------------------+| |
7190| ||:diagtext:`block pointer` || |
7191| |+--------------------------+| |
7192| ||:diagtext:`member pointer`|| |
7193| |+--------------------------+| |
7194+---------------------------+----------------------------+-----------------------------------------------------------------------------------------------------------+
7195
7196
Richard Smithcf9f4222017-01-20 19:27:09 +00007197-Wnullability-completeness-on-arrays
7198------------------------------------
7199This diagnostic is enabled by default.
7200
7201**Diagnostic text:**
7202
7203+----------------------------------------------------------------------------------------------------------------------------------------------+
7204|:warning:`warning:` |nbsp| :diagtext:`array parameter is missing a nullability type specifier (\_Nonnull, \_Nullable, or \_Null\_unspecified)`|
7205+----------------------------------------------------------------------------------------------------------------------------------------------+
7206
7207
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007208-Wnullability-declspec
7209----------------------
7210This diagnostic is an error by default, but the flag ``-Wno-nullability-declspec`` can be used to disable the error.
7211
7212**Diagnostic text:**
7213
7214+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+-------------+
7215|:error:`error:` |nbsp| :diagtext:`nullability specifier` |nbsp| :placeholder:`A` |nbsp| :diagtext:`cannot be applied to non-pointer type` |nbsp| :placeholder:`B`:diagtext:`; did you mean to apply the specifier to the` |nbsp| |+-----------------------------------+|:diagtext:`?`|
7216| ||:diagtext:`pointer` || |
7217| |+-----------------------------------+| |
7218| ||:diagtext:`block pointer` || |
7219| |+-----------------------------------+| |
7220| ||:diagtext:`member pointer` || |
7221| |+-----------------------------------+| |
7222| ||:diagtext:`function pointer` || |
7223| |+-----------------------------------+| |
7224| ||:diagtext:`member function pointer`|| |
7225| |+-----------------------------------+| |
7226+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+-------------+
7227
7228
7229-Wnullability-extension
7230-----------------------
7231**Diagnostic text:**
7232
7233+---------------------------------------------------------------------------------------------------------------------------------+
7234|:warning:`warning:` |nbsp| :diagtext:`type nullability specifier` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a Clang extension`|
7235+---------------------------------------------------------------------------------------------------------------------------------+
7236
7237
Richard Smithcf9f4222017-01-20 19:27:09 +00007238-Wnullability-inferred-on-nested-type
7239-------------------------------------
7240This diagnostic is enabled by default.
7241
7242**Diagnostic text:**
7243
7244+--------------------------------------------------------------------------------------------+-----------------------+---------------------------------+
7245|:warning:`warning:` |nbsp| :diagtext:`inferring '\_Nonnull' for pointer type within` |nbsp| |+---------------------+| |nbsp| :diagtext:`is deprecated`|
7246| ||:diagtext:`array` || |
7247| |+---------------------+| |
7248| ||:diagtext:`reference`|| |
7249| |+---------------------+| |
7250+--------------------------------------------------------------------------------------------+-----------------------+---------------------------------+
7251
7252
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007253-Wnullable-to-nonnull-conversion
7254--------------------------------
7255**Diagnostic text:**
7256
7257+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7258|:warning:`warning:` |nbsp| :diagtext:`implicit conversion from nullable pointer` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to non-nullable pointer type` |nbsp| :placeholder:`B`|
7259+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7260
7261
7262-Wobjc-autosynthesis-property-ivar-name-match
7263---------------------------------------------
7264This diagnostic is enabled by default.
7265
7266**Diagnostic text:**
7267
7268+---------------------------------------------------------------------------------------------------------------------------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------+
7269|:warning:`warning:` |nbsp| :diagtext:`autosynthesized property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`will use` |nbsp| |+-----------------------+| |nbsp| :diagtext:`instance variable` |nbsp| :placeholder:`C`:diagtext:`, not existing instance variable` |nbsp| :placeholder:`D`|
7270| || || |
7271| |+-----------------------+| |
7272| ||:diagtext:`synthesized`|| |
7273| |+-----------------------+| |
7274+---------------------------------------------------------------------------------------------------------------------------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------+
7275
7276
7277-Wobjc-circular-container
7278-------------------------
7279This diagnostic is enabled by default.
7280
7281**Diagnostic text:**
7282
7283+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
7284|:warning:`warning:` |nbsp| :diagtext:`adding '`:placeholder:`A`:diagtext:`' to '`:placeholder:`B`:diagtext:`' might cause circular dependency in container`|
7285+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
7286
7287
7288-Wobjc-cocoa-api
7289----------------
7290Synonym for `-Wobjc-redundant-api-use`_.
7291
7292
7293-Wobjc-designated-initializers
7294------------------------------
7295This diagnostic is enabled by default.
7296
7297**Diagnostic text:**
7298
7299+-----------------------------------------------------------------------------------------------------------------------------------+
7300|:warning:`warning:` |nbsp| :diagtext:`designated initializer missing a 'super' call to a designated initializer of the super class`|
7301+-----------------------------------------------------------------------------------------------------------------------------------+
7302
7303+--------------------------------------------------------------------------------------------------+
7304|:warning:`warning:` |nbsp| :diagtext:`designated initializer invoked a non-designated initializer`|
7305+--------------------------------------------------------------------------------------------------+
7306
7307+--------------------------------------------------------------------------------------------------------------------+
7308|:warning:`warning:` |nbsp| :diagtext:`designated initializer should only invoke a designated initializer on 'super'`|
7309+--------------------------------------------------------------------------------------------------------------------+
7310
7311+------------------------------------------------------------------------------------------------------------------------------------------------------------+
7312|:warning:`warning:` |nbsp| :diagtext:`method override for the designated initializer of the superclass` |nbsp| :placeholder:`A` |nbsp| :diagtext:`not found`|
7313+------------------------------------------------------------------------------------------------------------------------------------------------------------+
7314
7315+-----------------------------------------------------------------------------------------------------------+
7316|:warning:`warning:` |nbsp| :diagtext:`convenience initializer missing a 'self' call to another initializer`|
7317+-----------------------------------------------------------------------------------------------------------+
7318
7319+----------------------------------------------------------------------------------------------------------+
7320|:warning:`warning:` |nbsp| :diagtext:`convenience initializer should not invoke an initializer on 'super'`|
7321+----------------------------------------------------------------------------------------------------------+
7322
7323
Richard Smith66310362017-10-26 21:06:52 +00007324-Wobjc-flexible-array
7325---------------------
7326This diagnostic is enabled by default.
7327
7328**Diagnostic text:**
7329
7330+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7331|:warning:`warning:` |nbsp| :diagtext:`field` |nbsp| :placeholder:`A` |nbsp| :diagtext:`can overwrite instance variable` |nbsp| :placeholder:`B` |nbsp| :diagtext:`with variable sized type` |nbsp| :placeholder:`C` |nbsp| :diagtext:`in superclass` |nbsp| :placeholder:`D`|
7332+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7333
7334+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7335|:warning:`warning:` |nbsp| :diagtext:`field` |nbsp| :placeholder:`A` |nbsp| :diagtext:`with variable sized type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`is not visible to subclasses and can conflict with their instance variables`|
7336+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7337
7338
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007339-Wobjc-forward-class-redefinition
7340---------------------------------
7341This diagnostic is enabled by default.
7342
7343**Diagnostic text:**
7344
7345+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
7346|:warning:`warning:` |nbsp| :diagtext:`redefinition of forward class` |nbsp| :placeholder:`A` |nbsp| :diagtext:`of a typedef name of an object type is ignored`|
7347+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
7348
7349
7350-Wobjc-interface-ivars
7351----------------------
7352**Diagnostic text:**
7353
7354+-------------------------------------------------------------------------------------------------------+
7355|:warning:`warning:` |nbsp| :diagtext:`declaration of instance variables in the interface is deprecated`|
7356+-------------------------------------------------------------------------------------------------------+
7357
7358
7359-Wobjc-literal-compare
7360----------------------
7361This diagnostic is enabled by default.
7362
7363Also controls `-Wobjc-string-compare`_.
7364
7365**Diagnostic text:**
7366
7367+-------------------------------------------------------------------+----------------------------------+------------------------------------------+
7368|:warning:`warning:` |nbsp| :diagtext:`direct comparison of` |nbsp| |+--------------------------------+| |nbsp| :diagtext:`has undefined behavior`|
7369| ||:diagtext:`an array literal` || |
7370| |+--------------------------------+| |
7371| ||:diagtext:`a dictionary literal`|| |
7372| |+--------------------------------+| |
7373| ||:diagtext:`a numeric literal` || |
7374| |+--------------------------------+| |
7375| ||:diagtext:`a boxed expression` || |
7376| |+--------------------------------+| |
7377| || || |
7378| |+--------------------------------+| |
7379+-------------------------------------------------------------------+----------------------------------+------------------------------------------+
7380
7381
7382-Wobjc-literal-conversion
7383-------------------------
7384This diagnostic is enabled by default.
7385
7386**Diagnostic text:**
7387
7388+-------------------------------------------------------------------------------------------------------------------------+
7389|:warning:`warning:` |nbsp| :diagtext:`implicit boolean conversion of Objective-C object literal always evaluates to true`|
7390+-------------------------------------------------------------------------------------------------------------------------+
7391
7392+-------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+------------------------+
7393|:warning:`warning:` |nbsp| :diagtext:`object of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not compatible with` |nbsp| |+---------------------------------+| |nbsp| :placeholder:`C`|
7394| ||:diagtext:`array element type` || |
7395| |+---------------------------------+| |
7396| ||:diagtext:`dictionary key type` || |
7397| |+---------------------------------+| |
7398| ||:diagtext:`dictionary value type`|| |
7399| |+---------------------------------+| |
7400+-------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+------------------------+
7401
7402
7403-Wobjc-macro-redefinition
7404-------------------------
7405This diagnostic is enabled by default.
7406
7407**Diagnostic text:**
7408
7409+-------------------------------------------------------------------------------------------+
7410|:warning:`warning:` |nbsp| :diagtext:`ignoring redefinition of Objective-C qualifier macro`|
7411+-------------------------------------------------------------------------------------------+
7412
7413
Richard Smith66310362017-10-26 21:06:52 +00007414-Wobjc-messaging-id
7415-------------------
7416**Diagnostic text:**
7417
7418+---------------------------------------------------------------+
7419|:warning:`warning:` |nbsp| :diagtext:`messaging unqualified id`|
7420+---------------------------------------------------------------+
7421
7422
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007423-Wobjc-method-access
7424--------------------
7425This diagnostic is enabled by default.
7426
7427**Diagnostic text:**
7428
7429+---------------------------------------------------------------------------------------------------------------------------------------+
7430|:warning:`warning:` |nbsp| :diagtext:`class method` |nbsp| :placeholder:`A` |nbsp| :diagtext:`not found (return type defaults to 'id')`|
7431+---------------------------------------------------------------------------------------------------------------------------------------+
7432
7433+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7434|:warning:`warning:` |nbsp| :diagtext:`class method` |nbsp| :placeholder:`A` |nbsp| :diagtext:`not found (return type defaults to 'id'); did you mean` |nbsp| :placeholder:`C`:diagtext:`?`|
7435+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7436
7437+------------------------------------------------------------------------------------------------------------------------------------------+
7438|:warning:`warning:` |nbsp| :diagtext:`instance method` |nbsp| :placeholder:`A` |nbsp| :diagtext:`not found (return type defaults to 'id')`|
7439+------------------------------------------------------------------------------------------------------------------------------------------+
7440
7441+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7442|:warning:`warning:` |nbsp| :diagtext:`instance method` |nbsp| :placeholder:`A` |nbsp| :diagtext:`not found (return type defaults to 'id'); did you mean` |nbsp| :placeholder:`C`:diagtext:`?`|
7443+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7444
7445+-------------------------------------------------------------------------------------------------------------------------------------------------------+
7446|:warning:`warning:` |nbsp| :diagtext:`instance method` |nbsp| :placeholder:`A` |nbsp| :diagtext:`found instead of class method` |nbsp| :placeholder:`B`|
7447+-------------------------------------------------------------------------------------------------------------------------------------------------------+
7448
7449+---------------------------------------------------------------------------------------------------------------------------------------------------------+
7450|:warning:`warning:` |nbsp| :diagtext:`instance method` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is being used on 'Class' which is not in the root class`|
7451+---------------------------------------------------------------------------------------------------------------------------------------------------------+
7452
7453
7454-Wobjc-missing-property-synthesis
7455---------------------------------
7456**Diagnostic text:**
7457
7458+------------------------------------------------------------------------------------------------------------------+
7459|:warning:`warning:` |nbsp| :diagtext:`auto property synthesis is synthesizing property not explicitly synthesized`|
7460+------------------------------------------------------------------------------------------------------------------+
7461
7462
7463-Wobjc-missing-super-calls
7464--------------------------
7465This diagnostic is enabled by default.
7466
7467**Diagnostic text:**
7468
7469+-------------------------------------------------------------------------------------------------------------------+
7470|:warning:`warning:` |nbsp| :diagtext:`method possibly missing a \[super` |nbsp| :placeholder:`A`:diagtext:`\] call`|
7471+-------------------------------------------------------------------------------------------------------------------+
7472
7473
7474-Wobjc-multiple-method-names
7475----------------------------
7476This diagnostic is enabled by default.
7477
7478**Diagnostic text:**
7479
7480+--------------------------------------------------------------------------------------------------------------+
7481|:warning:`warning:` |nbsp| :diagtext:`multiple methods named` |nbsp| :placeholder:`A` |nbsp| :diagtext:`found`|
7482+--------------------------------------------------------------------------------------------------------------+
7483
7484
7485-Wobjc-noncopy-retain-block-property
7486------------------------------------
7487This diagnostic is enabled by default.
7488
7489**Diagnostic text:**
7490
7491+--------------------------------------------------------------------------------------------------------------------+
7492|:warning:`warning:` |nbsp| :diagtext:`retain'ed block property does not copy the block - use copy attribute instead`|
7493+--------------------------------------------------------------------------------------------------------------------+
7494
7495
7496-Wobjc-nonunified-exceptions
7497----------------------------
7498This diagnostic is enabled by default.
7499
7500**Diagnostic text:**
7501
7502+-----------------------------------------------------------------------------------------------------------------------------+
7503|:warning:`warning:` |nbsp| :diagtext:`cannot catch an exception thrown with @throw in C++ in the non-unified exception model`|
7504+-----------------------------------------------------------------------------------------------------------------------------+
7505
7506
7507-Wobjc-property-implementation
7508------------------------------
7509This diagnostic is enabled by default.
7510
7511**Diagnostic text:**
7512
7513+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7514|:warning:`warning:` |nbsp| :diagtext:`class property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`requires method` |nbsp| :placeholder:`B` |nbsp| :diagtext:`to be defined - use @dynamic or provide a method implementation in this class implementation`|
7515+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7516
7517+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7518|:warning:`warning:` |nbsp| :diagtext:`class property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`requires method` |nbsp| :placeholder:`B` |nbsp| :diagtext:`to be defined - use @dynamic or provide a method implementation in this category`|
7519+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7520
7521+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7522|:warning:`warning:` |nbsp| :diagtext:`property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`requires method` |nbsp| :placeholder:`B` |nbsp| :diagtext:`to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation`|
7523+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7524
7525+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7526|:warning:`warning:` |nbsp| :diagtext:`property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`requires method` |nbsp| :placeholder:`B` |nbsp| :diagtext:`to be defined - use @dynamic or provide a method implementation in this category`|
7527+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7528
7529
7530-Wobjc-property-implicit-mismatch
7531---------------------------------
7532This diagnostic is enabled by default.
7533
7534**Diagnostic text:**
7535
7536+---------------------------------------------------------------------------------------------------------------------------------------+
7537|:warning:`warning:` |nbsp| :diagtext:`primary property declaration is implicitly strong while redeclaration in class extension is weak`|
7538+---------------------------------------------------------------------------------------------------------------------------------------+
7539
7540
7541-Wobjc-property-matches-cocoa-ownership-rule
7542--------------------------------------------
7543This diagnostic is enabled by default.
7544
7545**Diagnostic text:**
7546
7547+-------------------------------------------------------------------------------------------------------------+
7548|:warning:`warning:` |nbsp| :diagtext:`property follows Cocoa naming convention for returning 'owned' objects`|
7549+-------------------------------------------------------------------------------------------------------------+
7550
7551
7552-Wobjc-property-no-attribute
7553----------------------------
7554This diagnostic is enabled by default.
7555
7556**Diagnostic text:**
7557
7558+------------------------------------------------------------------------------------------------------------+
7559|:warning:`warning:` |nbsp| :diagtext:`default property attribute 'assign' not appropriate for non-GC object`|
7560+------------------------------------------------------------------------------------------------------------+
7561
7562+--------------------------------------------------------------------------------------------------------------------+
7563|:warning:`warning:` |nbsp| :diagtext:`no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed`|
7564+--------------------------------------------------------------------------------------------------------------------+
7565
7566
7567-Wobjc-property-synthesis
7568-------------------------
7569This diagnostic is enabled by default.
7570
7571**Diagnostic text:**
7572
7573+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7574|:warning:`warning:` |nbsp| :diagtext:`auto property synthesis will not synthesize property` |nbsp| :placeholder:`A`:diagtext:`; it will be implemented by its superclass, use @dynamic to acknowledge intention`|
7575+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7576
7577+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7578|:warning:`warning:` |nbsp| :diagtext:`auto property synthesis will not synthesize property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`because it is 'readwrite' but it will be synthesized 'readonly' via another property`|
7579+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7580
7581+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7582|:warning:`warning:` |nbsp| :diagtext:`auto property synthesis will not synthesize property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`because it cannot share an ivar with another synthesized property`|
7583+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7584
7585
7586-Wobjc-protocol-method-implementation
7587-------------------------------------
7588This diagnostic is enabled by default.
7589
7590**Diagnostic text:**
7591
7592+----------------------------------------------------------------------------------------------------------------------------+
7593|:warning:`warning:` |nbsp| :diagtext:`category is implementing a method which will also be implemented by its primary class`|
7594+----------------------------------------------------------------------------------------------------------------------------+
7595
7596
7597-Wobjc-protocol-property-synthesis
7598----------------------------------
7599This diagnostic is enabled by default.
7600
7601**Diagnostic text:**
7602
7603+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7604|:warning:`warning:` |nbsp| :diagtext:`auto property synthesis will not synthesize property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`declared in protocol` |nbsp| :placeholder:`B`|
7605+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7606
7607
7608-Wobjc-protocol-qualifiers
7609--------------------------
7610This diagnostic is enabled by default.
7611
7612**Diagnostic text:**
7613
7614+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7615|:warning:`warning:` |nbsp| :diagtext:`parameterized class` |nbsp| :placeholder:`A` |nbsp| :diagtext:`already conforms to the protocols listed; did you forget a '\*'?`|
7616+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7617
7618
7619-Wobjc-readonly-with-setter-property
7620------------------------------------
7621This diagnostic is enabled by default.
7622
7623**Diagnostic text:**
7624
7625+-----------------------------------------------------------------------------------------+
7626|:warning:`warning:` |nbsp| :diagtext:`setter cannot be specified for a readonly property`|
7627+-----------------------------------------------------------------------------------------+
7628
7629
7630-Wobjc-redundant-api-use
7631------------------------
7632Synonym for `-Wobjc-redundant-literal-use`_.
7633
7634
7635-Wobjc-redundant-literal-use
7636----------------------------
7637This diagnostic is enabled by default.
7638
7639**Diagnostic text:**
7640
7641+-------------------------------------------------------------------------------------------------------------------+
7642|:warning:`warning:` |nbsp| :diagtext:`using` |nbsp| :placeholder:`A` |nbsp| :diagtext:`with a literal is redundant`|
7643+-------------------------------------------------------------------------------------------------------------------+
7644
7645
7646-Wobjc-root-class
7647-----------------
7648This diagnostic is enabled by default.
7649
7650**Diagnostic text:**
7651
7652+-------------------------------------------------------------------------------------------------------------------------------+
7653|:warning:`warning:` |nbsp| :diagtext:`class` |nbsp| :placeholder:`A` |nbsp| :diagtext:`defined without specifying a base class`|
7654+-------------------------------------------------------------------------------------------------------------------------------+
7655
7656
7657-Wobjc-string-compare
7658---------------------
7659This diagnostic is enabled by default.
7660
7661**Diagnostic text:**
7662
7663+---------------------------------------------------------------------------------------------------+
7664|:warning:`warning:` |nbsp| :diagtext:`direct comparison of a string literal has undefined behavior`|
7665+---------------------------------------------------------------------------------------------------+
7666
7667
7668-Wobjc-string-concatenation
7669---------------------------
7670This diagnostic is enabled by default.
7671
7672**Diagnostic text:**
7673
7674+-------------------------------------------------------------------------------------------------------------------------+
7675|:warning:`warning:` |nbsp| :diagtext:`concatenated NSString literal for an NSArray expression - possibly missing a comma`|
7676+-------------------------------------------------------------------------------------------------------------------------+
7677
7678
Richard Smith9a016602017-04-13 22:44:22 +00007679-Wobjc-unsafe-perform-selector
7680------------------------------
7681This diagnostic is enabled by default.
7682
7683**Diagnostic text:**
7684
7685+-------------------------------------------------------------------------------------------------------------------+--------------------+------------------------+
7686|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is incompatible with selectors that return a` |nbsp| |+------------------+| |nbsp| :diagtext:`type`|
7687| ||:diagtext:`struct`|| |
7688| |+------------------+| |
7689| ||:diagtext:`union` || |
7690| |+------------------+| |
7691| ||:diagtext:`vector`|| |
7692| |+------------------+| |
7693+-------------------------------------------------------------------------------------------------------------------+--------------------+------------------------+
7694
7695
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007696-Wodr
7697-----
7698This diagnostic is enabled by default.
7699
7700**Diagnostic text:**
7701
7702+--------------------------------------------------------------------------------------------------------------------------------------------------+
7703|:warning:`warning:` |nbsp| :diagtext:`type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has incompatible definitions in different translation units`|
7704+--------------------------------------------------------------------------------------------------------------------------------------------------+
7705
7706
7707-Wold-style-cast
7708----------------
7709**Diagnostic text:**
7710
7711+------------------------------------------------------------+
7712|:warning:`warning:` |nbsp| :diagtext:`use of old-style cast`|
7713+------------------------------------------------------------+
7714
7715
7716-Wold-style-definition
7717----------------------
7718This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
7719
7720-Wopencl-unsupported-rgba
7721-------------------------
7722This diagnostic is enabled by default.
7723
7724**Diagnostic text:**
7725
7726+----------------------------------------------------------------------------------------------------------------------------+
7727|:warning:`warning:` |nbsp| :diagtext:`vector component name '`:placeholder:`A`:diagtext:`' is an OpenCL version 2.2 feature`|
7728+----------------------------------------------------------------------------------------------------------------------------+
7729
7730
7731-Wopenmp-clauses
7732----------------
7733This diagnostic is enabled by default.
7734
7735**Diagnostic text:**
7736
7737+-------------------------------------------------------------------------------------------------------------------------+
7738|:warning:`warning:` |nbsp| :diagtext:`aligned clause will be ignored because the requested alignment is not a power of 2`|
7739+-------------------------------------------------------------------------------------------------------------------------+
7740
7741+---------------------------------------------------------------------------------+---------------------------------------------------+-------------------------------------+
7742|:warning:`warning:` |nbsp| :diagtext:`zero linear step (`:placeholder:`A` |nbsp| |+-------------------------------------------------+|:diagtext:`should probably be const)`|
7743| || || |
7744| |+-------------------------------------------------+| |
7745| ||:diagtext:`and other variables in clause` |nbsp| || |
7746| |+-------------------------------------------------+| |
7747+---------------------------------------------------------------------------------+---------------------------------------------------+-------------------------------------+
7748
7749
7750-Wopenmp-loop-form
7751------------------
7752This diagnostic is enabled by default.
7753
7754**Diagnostic text:**
7755
7756+-----------------------------------------------------------------------------------------------------------------------------------------+
7757|:warning:`warning:` |nbsp| :diagtext:`initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')`|
7758+-----------------------------------------------------------------------------------------------------------------------------------------+
7759
7760+-----------------------------------------------------------------------------------------------------------------------------+
7761|:warning:`warning:` |nbsp| :diagtext:`OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed`|
7762+-----------------------------------------------------------------------------------------------------------------------------+
7763
7764
7765-Wopenmp-target
7766---------------
7767This diagnostic is enabled by default.
7768
7769**Diagnostic text:**
7770
Richard Smithcf9f4222017-01-20 19:27:09 +00007771+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7772|:warning:`warning:` |nbsp| :diagtext:`The OpenMP offloading target '`:placeholder:`A`:diagtext:`' is similar to target '`:placeholder:`B`:diagtext:`' already specified - will be ignored.`|
7773+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7774
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007775+-----------------------------------------------------------------------------------------------+
7776|:warning:`warning:` |nbsp| :diagtext:`declaration is not declared in any declare target region`|
7777+-----------------------------------------------------------------------------------------------+
7778
7779
7780-Woption-ignored
7781----------------
7782This diagnostic is enabled by default.
7783
7784**Diagnostic text:**
7785
Richard Smith66310362017-10-26 21:06:52 +00007786+------------------------------------------------------------------------------------------------------------------------------------------+
7787|:warning:`warning:` |nbsp| :diagtext:`option '-ffine-grained-bitfield-accesses' cannot be enabled together with a sanitizer; flag ignored`|
7788+------------------------------------------------------------------------------------------------------------------------------------------+
7789
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007790+----------------------------------------------------------------------------------------------------------------------------+
7791|:warning:`warning:` |nbsp| :diagtext:`option '`:placeholder:`A`:diagtext:`' was ignored by the PS4 toolchain, using '-fPIC'`|
7792+----------------------------------------------------------------------------------------------------------------------------+
7793
Richard Smith66310362017-10-26 21:06:52 +00007794+-------------------------------------------------------------------------------------------------------------------------------------------+
7795|:warning:`warning:` |nbsp| :diagtext:`ignoring '-mabicalls' option as it cannot be used with non position-independent code and the N64 ABI`|
7796+-------------------------------------------------------------------------------------------------------------------------------------------+
7797
7798+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------+----------------------+
7799|:warning:`warning:` |nbsp| :diagtext:`ignoring '-mlong-calls' option as it is not currently supported with` |nbsp| |+-----------------------------------------+|:diagtext:`-mabicalls`|
7800| || || |
7801| |+-----------------------------------------+| |
7802| ||:diagtext:`the implicit usage of` |nbsp| || |
7803| |+-----------------------------------------+| |
7804+-------------------------------------------------------------------------------------------------------------------+-------------------------------------------+----------------------+
7805
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007806
7807-Wout-of-line-declaration
7808-------------------------
7809This diagnostic is an error by default, but the flag ``-Wno-out-of-line-declaration`` can be used to disable the error.
7810
7811**Diagnostic text:**
7812
7813+-------------------------------------------------------------------------------------------+
7814|:error:`error:` |nbsp| :diagtext:`out-of-line declaration of a member must be a definition`|
7815+-------------------------------------------------------------------------------------------+
7816
7817
Richard Smith66310362017-10-26 21:06:52 +00007818-Wout-of-scope-function
7819-----------------------
7820This diagnostic is enabled by default.
7821
7822**Diagnostic text:**
7823
7824+-------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------+
7825|:warning:`warning:` |nbsp| :diagtext:`use of out-of-scope declaration of` |nbsp| :placeholder:`A`|+-------------------------------------------------------------------------------------+|
7826| || ||
7827| |+-------------------------------------------------------------------------------------+|
7828| || |nbsp| :diagtext:`whose type is not compatible with that of an implicit declaration`||
7829| |+-------------------------------------------------------------------------------------+|
7830+-------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------+
7831
7832
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007833-Wover-aligned
7834--------------
7835**Diagnostic text:**
7836
7837+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7838|:warning:`warning:` |nbsp| :diagtext:`type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`requires` |nbsp| :placeholder:`B` |nbsp| :diagtext:`bytes of alignment and the default allocator only guarantees` |nbsp| :placeholder:`C` |nbsp| :diagtext:`bytes`|
7839+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7840
7841
7842-Woverflow
7843----------
7844This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
7845
7846-Woverlength-strings
7847--------------------
7848**Diagnostic text:**
7849
7850+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------+
7851|:warning:`warning:` |nbsp| :diagtext:`string literal of length` |nbsp| :placeholder:`A` |nbsp| :diagtext:`exceeds maximum length` |nbsp| :placeholder:`B` |nbsp| :diagtext:`that` |nbsp| |+-------------------+| |nbsp| :diagtext:`compilers are required to support`|
7852| ||:diagtext:`C90` || |
7853| |+-------------------+| |
7854| ||:diagtext:`ISO C99`|| |
7855| |+-------------------+| |
7856| ||:diagtext:`C++` || |
7857| |+-------------------+| |
7858+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+-----------------------------------------------------+
7859
7860
7861-Woverloaded-shift-op-parentheses
7862---------------------------------
7863This diagnostic is enabled by default.
7864
7865**Diagnostic text:**
7866
7867+------------------------------------------------------------------+----------------+------------------------------------------------------------------+
7868|:warning:`warning:` |nbsp| :diagtext:`overloaded operator` |nbsp| |+--------------+| |nbsp| :diagtext:`has higher precedence than comparison operator`|
7869| ||:diagtext:`>>`|| |
7870| |+--------------+| |
7871| ||:diagtext:`<<`|| |
7872| |+--------------+| |
7873+------------------------------------------------------------------+----------------+------------------------------------------------------------------+
7874
7875
7876-Woverloaded-virtual
7877--------------------
7878**Diagnostic text:**
7879
7880+-----------------------------------------------------------------------------------------------+-----------------------+
7881|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`hides overloaded virtual` |nbsp| |+---------------------+|
7882| ||:diagtext:`function` ||
7883| |+---------------------+|
7884| ||:diagtext:`functions`||
7885| |+---------------------+|
7886+-----------------------------------------------------------------------------------------------+-----------------------+
7887
7888
7889-Woverride-module
7890-----------------
7891This diagnostic is enabled by default.
7892
7893**Diagnostic text:**
7894
7895+-------------------------------------------------------------------------------------------------------+
7896|:warning:`warning:` |nbsp| :diagtext:`overriding the module target triple with` |nbsp| :placeholder:`A`|
7897+-------------------------------------------------------------------------------------------------------+
7898
7899
7900-Woverriding-method-mismatch
7901----------------------------
7902**Diagnostic text:**
7903
7904+-------------------------------------------------------------------------------------------------------------------------------------------+
7905|:warning:`warning:` |nbsp| :diagtext:`conflicting distributed object modifiers on parameter type in declaration of` |nbsp| :placeholder:`A`|
7906+-------------------------------------------------------------------------------------------------------------------------------------------+
7907
7908+------------------------------------------------------------------------------------------------------------+
7909|:warning:`warning:` |nbsp| :diagtext:`conflicting parameter types in declaration of` |nbsp| :placeholder:`A`|
7910+------------------------------------------------------------------------------------------------------------+
7911
7912+----------------------------------------------------------------------------------------------------------------------------------------+
7913|:warning:`warning:` |nbsp| :diagtext:`conflicting distributed object modifiers on return type in declaration of` |nbsp| :placeholder:`A`|
7914+----------------------------------------------------------------------------------------------------------------------------------------+
7915
7916+--------------------------------------------------------------------------------------------------------+
7917|:warning:`warning:` |nbsp| :diagtext:`conflicting return type in declaration of` |nbsp| :placeholder:`A`|
7918+--------------------------------------------------------------------------------------------------------+
7919
7920+--------------------------------------------------------------------------------------------------------+
7921|:warning:`warning:` |nbsp| :diagtext:`conflicting variadic declaration of method and its implementation`|
7922+--------------------------------------------------------------------------------------------------------+
7923
7924+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7925|:warning:`warning:` |nbsp| :diagtext:`conflicting parameter types in declaration of` |nbsp| :placeholder:`A`:diagtext:`:` |nbsp| :placeholder:`B` |nbsp| :diagtext:`vs` |nbsp| :placeholder:`C`|
7926+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7927
7928+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7929|:warning:`warning:` |nbsp| :diagtext:`conflicting return type in declaration of` |nbsp| :placeholder:`A`:diagtext:`:` |nbsp| :placeholder:`B` |nbsp| :diagtext:`vs` |nbsp| :placeholder:`C`|
7930+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7931
7932
7933-Woverriding-t-option
7934---------------------
7935This diagnostic is enabled by default.
7936
7937**Diagnostic text:**
7938
7939+---------------------------------------------------------------------------------------------------------------------------+
7940|:warning:`warning:` |nbsp| :diagtext:`overriding '`:placeholder:`A`:diagtext:`' option with '`:placeholder:`B`:diagtext:`'`|
7941+---------------------------------------------------------------------------------------------------------------------------+
7942
7943
7944-Wpacked
7945--------
7946**Diagnostic text:**
7947
7948+--------------------------------------------------------------------------------------------------+
7949|:warning:`warning:` |nbsp| :diagtext:`packed attribute is unnecessary for` |nbsp| :placeholder:`A`|
7950+--------------------------------------------------------------------------------------------------+
7951
7952
7953-Wpadded
7954--------
7955**Diagnostic text:**
7956
7957+------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+------------------+---------------+------------------------------------------------+
7958|:warning:`warning:` |nbsp| :diagtext:`padding` |nbsp| |+---------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`with` |nbsp| :placeholder:`C` |nbsp| |+----------------+|+-------------+| |nbsp| :diagtext:`to align anonymous bit-field`|
7959| ||:diagtext:`struct` || ||:diagtext:`byte`||| || |
7960| |+---------------------+| |+----------------+|+-------------+| |
7961| ||:diagtext:`interface`|| ||:diagtext:`bit` |||:diagtext:`s`|| |
7962| |+---------------------+| |+----------------+|+-------------+| |
7963| ||:diagtext:`class` || | | | |
7964| |+---------------------+| | | | |
7965+------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+------------------+---------------+------------------------------------------------+
7966
7967+------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+------------------+---------------+----------------------------------------------------+
7968|:warning:`warning:` |nbsp| :diagtext:`padding` |nbsp| |+---------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`with` |nbsp| :placeholder:`C` |nbsp| |+----------------+|+-------------+| |nbsp| :diagtext:`to align` |nbsp| :placeholder:`E`|
7969| ||:diagtext:`struct` || ||:diagtext:`byte`||| || |
7970| |+---------------------+| |+----------------+|+-------------+| |
7971| ||:diagtext:`interface`|| ||:diagtext:`bit` |||:diagtext:`s`|| |
7972| |+---------------------+| |+----------------+|+-------------+| |
7973| ||:diagtext:`class` || | | | |
7974| |+---------------------+| | | | |
7975+------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+------------------+---------------+----------------------------------------------------+
7976
7977+--------------------------------------------------------------------------------------------------------------------------------------+------------------+---------------+-----------------------------------------+
7978|:warning:`warning:` |nbsp| :diagtext:`padding size of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`with` |nbsp| :placeholder:`B` |nbsp| |+----------------+|+-------------+| |nbsp| :diagtext:`to alignment boundary`|
7979| ||:diagtext:`byte`||| || |
7980| |+----------------+|+-------------+| |
7981| ||:diagtext:`bit` |||:diagtext:`s`|| |
7982| |+----------------+|+-------------+| |
7983+--------------------------------------------------------------------------------------------------------------------------------------+------------------+---------------+-----------------------------------------+
7984
7985
7986-Wparentheses
7987-------------
7988This diagnostic is enabled by default.
7989
Richard Smith8cba2912016-09-14 01:55:42 +00007990Also controls `-Wbitwise-op-parentheses`_, `-Wdangling-else`_, `-Wlogical-not-parentheses`_, `-Wlogical-op-parentheses`_, `-Woverloaded-shift-op-parentheses`_, `-Wparentheses-equality`_, `-Wshift-op-parentheses`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00007991
7992**Diagnostic text:**
7993
7994+-----------------------------------------------------------------------------------------------------------+
7995|:warning:`warning:` |nbsp| :diagtext:`using the result of an assignment as a condition without parentheses`|
7996+-----------------------------------------------------------------------------------------------------------+
7997
7998+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
7999|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has lower precedence than` |nbsp| :placeholder:`B`:diagtext:`;` |nbsp| :placeholder:`B` |nbsp| :diagtext:`will be evaluated first`|
8000+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8001
8002+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8003|:warning:`warning:` |nbsp| :diagtext:`operator '?:' has lower precedence than '`:placeholder:`A`:diagtext:`'; '`:placeholder:`A`:diagtext:`' will be evaluated first`|
8004+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8005
8006
8007-Wparentheses-equality
8008----------------------
8009This diagnostic is enabled by default.
8010
8011**Diagnostic text:**
8012
8013+--------------------------------------------------------------------------------------+
8014|:warning:`warning:` |nbsp| :diagtext:`equality comparison with extraneous parentheses`|
8015+--------------------------------------------------------------------------------------+
8016
8017
8018-Wpartial-availability
8019----------------------
8020Synonym for `-Wunguarded-availability`_.
8021
8022
8023-Rpass
8024------
8025**Diagnostic text:**
8026
8027The text of this diagnostic is not controlled by Clang.
8028
8029
8030-Rpass-analysis
8031---------------
8032**Diagnostic text:**
8033
8034The text of this diagnostic is not controlled by Clang.
8035
8036+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8037|:remark:`remark:` |nbsp| :placeholder:`A`:diagtext:`; allow reordering by specifying '#pragma clang loop vectorize(enable)' before the loop. If the arrays will always be independent specify '#pragma clang loop vectorize(assume\_safety)' before the loop or provide the '\_\_restrict\_\_' qualifier with the independent array arguments. Erroneous results will occur if these options are incorrectly applied!`|
8038+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8039
8040+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8041|:remark:`remark:` |nbsp| :placeholder:`A`:diagtext:`; allow reordering by specifying '#pragma clang loop vectorize(enable)' before the loop or by providing the compiler option '-ffast-math'.`|
8042+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8043
8044
8045-Wpass-failed
8046-------------
8047This diagnostic is enabled by default.
8048
8049**Diagnostic text:**
8050
8051The text of this diagnostic is not controlled by Clang.
8052
8053
8054-Rpass-missed
8055-------------
8056**Diagnostic text:**
8057
8058The text of this diagnostic is not controlled by Clang.
8059
8060
8061-Wpch-date-time
8062---------------
8063This diagnostic is enabled by default.
8064
8065**Diagnostic text:**
8066
8067+---------------------------+--------------------------------+-----------------------------------------------------+
8068|:warning:`warning:` |nbsp| |+------------------------------+| |nbsp| :diagtext:`uses \_\_DATE\_\_ or \_\_TIME\_\_`|
8069| ||:diagtext:`precompiled header`|| |
8070| |+------------------------------+| |
8071| ||:diagtext:`module` || |
8072| |+------------------------------+| |
8073+---------------------------+--------------------------------+-----------------------------------------------------+
8074
8075
8076-Wpedantic
8077----------
Richard Smith66310362017-10-26 21:06:52 +00008078Also controls `-Wc++11-extra-semi`_, `-Wc++11-long-long`_, `-Wc++14-binary-literal`_, `-Wc11-extensions`_, `-Wcomplex-component-init`_, `-Wdeclaration-after-statement`_, `-Wdollar-in-identifier-extension`_, `-Wembedded-directive`_, `-Wempty-translation-unit`_, `-Wextended-offsetof`_, `-Wflexible-array-extensions`_, `-Wformat-pedantic`_, `-Wfour-char-constants`_, `-Wgnu-anonymous-struct`_, `-Wgnu-auto-type`_, `-Wgnu-binary-literal`_, `-Wgnu-case-range`_, `-Wgnu-complex-integer`_, `-Wgnu-compound-literal-initializer`_, `-Wgnu-conditional-omitted-operand`_, `-Wgnu-empty-initializer`_, `-Wgnu-empty-struct`_, `-Wgnu-flexible-array-initializer`_, `-Wgnu-flexible-array-union-member`_, `-Wgnu-folding-constant`_, `-Wgnu-imaginary-constant`_, `-Wgnu-include-next`_, `-Wgnu-label-as-value`_, `-Wgnu-redeclared-enum`_, `-Wgnu-statement-expression`_, `-Wgnu-union-cast`_, `-Wgnu-zero-line-directive`_, `-Wgnu-zero-variadic-macro-arguments`_, `-Wimport-preprocessor-directive-pedantic`_, `-Wkeyword-macro`_, `-Wlanguage-extension-token`_, `-Wlong-long`_, `-Wmicrosoft-charize`_, `-Wmicrosoft-comment-paste`_, `-Wmicrosoft-cpp-macro`_, `-Wmicrosoft-end-of-file`_, `-Wmicrosoft-enum-value`_, `-Wmicrosoft-fixed-enum`_, `-Wmicrosoft-flexible-array`_, `-Wmicrosoft-redeclare-static`_, `-Wnested-anon-types`_, `-Wnullability-extension`_, `-Woverlength-strings`_, `-Wretained-language-linkage`_, `-Wundefined-internal-type`_, `-Wvla-extension`_, `-Wzero-length-array`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008079
8080**Diagnostic text:**
8081
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008082+------------------------------------------------------------------------+
8083|:warning:`warning:` |nbsp| :diagtext:`'enable\_if' is a clang extension`|
8084+------------------------------------------------------------------------+
8085
Richard Smithcf9f4222017-01-20 19:27:09 +00008086+--------------------------------------------------------------------------+
8087|:warning:`warning:` |nbsp| :diagtext:`'diagnose\_if' is a clang extension`|
8088+--------------------------------------------------------------------------+
8089
Richard Smithce9d5862016-09-14 01:51:10 +00008090+--------------------------------------------------------------------------------+
8091|:warning:`warning:` |nbsp| :diagtext:`designated initializers are a C99 feature`|
8092+--------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008093
Richard Smithce9d5862016-09-14 01:51:10 +00008094+--------------------------------------------------------------------------------------------+
8095|:warning:`warning:` |nbsp| :diagtext:`ISO C++ does not allow 'main' to be used by a program`|
8096+--------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008097
Richard Smithce9d5862016-09-14 01:51:10 +00008098+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------+
8099|:warning:`warning:` |nbsp| :diagtext:`C++98 requires an accessible copy constructor for class` |nbsp| :placeholder:`C` |nbsp| :diagtext:`when binding a reference to a temporary; was` |nbsp| |+---------------------+|
8100| ||:diagtext:`private` ||
8101| |+---------------------+|
8102| ||:diagtext:`protected`||
8103| |+---------------------+|
8104+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008105
Richard Smithce9d5862016-09-14 01:51:10 +00008106+--------------------------------------------------------+--------------------+------------------------------------------------------------+
8107|:warning:`warning:` |nbsp| :diagtext:`anonymous` |nbsp| |+------------------+| |nbsp| :diagtext:`cannot be '`:placeholder:`B`:diagtext:`'`|
8108| ||:diagtext:`struct`|| |
8109| |+------------------+| |
8110| ||:diagtext:`union` || |
8111| |+------------------+| |
8112+--------------------------------------------------------+--------------------+------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008113
8114+--------------------------------------------------------------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
8115|:warning:`warning:` |nbsp| :diagtext:`no viable constructor` |nbsp| |+---------------------------------------+| |nbsp| :diagtext:`of type` |nbsp| :placeholder:`B`:diagtext:`; C++98 requires a copy constructor when binding a reference to a temporary`|
8116| ||:diagtext:`copying variable` || |
8117| |+---------------------------------------+| |
8118| ||:diagtext:`copying parameter` || |
8119| |+---------------------------------------+| |
8120| ||:diagtext:`returning object` || |
8121| |+---------------------------------------+| |
8122| ||:diagtext:`throwing object` || |
8123| |+---------------------------------------+| |
8124| ||:diagtext:`copying member subobject` || |
8125| |+---------------------------------------+| |
8126| ||:diagtext:`copying array element` || |
8127| |+---------------------------------------+| |
8128| ||:diagtext:`allocating object` || |
8129| |+---------------------------------------+| |
8130| ||:diagtext:`copying temporary` || |
8131| |+---------------------------------------+| |
8132| ||:diagtext:`initializing base subobject`|| |
8133| |+---------------------------------------+| |
8134| ||:diagtext:`initializing vector element`|| |
8135| |+---------------------------------------+| |
8136| ||:diagtext:`capturing value` || |
8137| |+---------------------------------------+| |
8138+--------------------------------------------------------------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
8139
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008140+--------------------------------------------------------------------------------------------------------------------------------------+
8141|:warning:`warning:` |nbsp| :diagtext:`parameter` |nbsp| :placeholder:`A` |nbsp| :diagtext:`was not declared, defaulting to type 'int'`|
8142+--------------------------------------------------------------------------------------------------------------------------------------+
8143
Richard Smith66310362017-10-26 21:06:52 +00008144+--------------------------------------------------------------------------------------------------------------------------+
8145|:warning:`warning:` |nbsp| :diagtext:`invoking a pointer to a 'const &' member function on an rvalue is a C++2a extension`|
8146+--------------------------------------------------------------------------------------------------------------------------+
8147
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008148+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8149|:warning:`warning:` |nbsp| :diagtext:`qualifier in explicit instantiation of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`requires a template-id (a typedef is not permitted)`|
8150+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8151
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008152+-----------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------+
8153|:warning:`warning:` |nbsp| :diagtext:`static` |nbsp| |+--------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`is used in an inline function with external linkage`|
8154| ||:diagtext:`function`|| |
8155| |+--------------------+| |
8156| ||:diagtext:`variable`|| |
8157| |+--------------------+| |
8158+-----------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------+
8159
Richard Smithce9d5862016-09-14 01:51:10 +00008160+---------------------------------------------------------------------------------------+
8161|:warning:`warning:` |nbsp| :diagtext:`ISO C forbids forward references to 'enum' types`|
8162+---------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008163
8164+----------------------------------------------------------------------------------------------------------------------------------------------+-------------------+-------------+
8165|:warning:`warning:` |nbsp| :diagtext:`ISO C restricts enumerator values to range of 'int' (`:placeholder:`A` |nbsp| :diagtext:`is too` |nbsp| |+-----------------+|:diagtext:`)`|
8166| ||:diagtext:`small`|| |
8167| |+-----------------+| |
8168| ||:diagtext:`large`|| |
8169| |+-----------------+| |
8170+----------------------------------------------------------------------------------------------------------------------------------------------+-------------------+-------------+
8171
Richard Smithce9d5862016-09-14 01:51:10 +00008172+--------------------------------------------------------------------------------------------------+
8173|:warning:`warning:` |nbsp| :diagtext:`size of static array must be an integer constant expression`|
8174+--------------------------------------------------------------------------------------------------+
8175
8176+-----------------------------------------------------------------------------------------------+
8177|:warning:`warning:` |nbsp| :diagtext:`initializer for aggregate is not a compile-time constant`|
8178+-----------------------------------------------------------------------------------------------+
8179
8180+-------------------------------------------------------------------------------+
8181|:warning:`warning:` |nbsp| :diagtext:`flexible array members are a C99 feature`|
8182+-------------------------------------------------------------------------------+
8183
8184+---------------------------------------------------------------+-----------------------+--------------------------------+
8185|:warning:`warning:` |nbsp| :diagtext:`invalid application of '`|+---------------------+|:diagtext:`' to a function type`|
8186| ||:diagtext:`sizeof` || |
8187| |+---------------------+| |
8188| ||:diagtext:`alignof` || |
8189| |+---------------------+| |
8190| ||:diagtext:`vec\_step`|| |
8191| |+---------------------+| |
8192+---------------------------------------------------------------+-----------------------+--------------------------------+
8193
8194+---------------------------------------------------------------+-----------------------+----------------------------+
8195|:warning:`warning:` |nbsp| :diagtext:`invalid application of '`|+---------------------+|:diagtext:`' to a void type`|
8196| ||:diagtext:`sizeof` || |
8197| |+---------------------+| |
8198| ||:diagtext:`alignof` || |
8199| |+---------------------+| |
8200| ||:diagtext:`vec\_step`|| |
8201| |+---------------------+| |
8202+---------------------------------------------------------------+-----------------------+----------------------------+
8203
8204+-------------------------------------------------------------------------------------------+
8205|:warning:`warning:` |nbsp| :diagtext:`ISO C90 does not allow subscripting non-lvalue array`|
8206+-------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008207
8208+----------------------------------------------------------------------------------------+
Richard Smithce9d5862016-09-14 01:51:10 +00008209|:warning:`warning:` |nbsp| :diagtext:`subscript of a pointer to void is a GNU extension`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008210+----------------------------------------------------------------------------------------+
8211
Richard Smithce9d5862016-09-14 01:51:10 +00008212+-------------------------------------------------------------------------------------------------------+
8213|:warning:`warning:` |nbsp| :diagtext:`ISO C forbids taking the address of an expression of type 'void'`|
8214+-------------------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008215
Richard Smithce9d5862016-09-14 01:51:10 +00008216+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8217|:warning:`warning:` |nbsp| :diagtext:`ordered comparison between pointer and zero (`:placeholder:`A` |nbsp| :diagtext:`and` |nbsp| :placeholder:`B`:diagtext:`) is an extension`|
8218+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008219
8220+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8221|:warning:`warning:` |nbsp| :diagtext:`equality comparison between function pointer and void pointer (`:placeholder:`A` |nbsp| :diagtext:`and` |nbsp| :placeholder:`B`:diagtext:`)`|
8222+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8223
Richard Smithce9d5862016-09-14 01:51:10 +00008224+----------------------------------------------------+-----------------------+---------------------------+---------------+----------------------------------------------+
8225|:warning:`warning:` |nbsp| :diagtext:`arithmetic on`|+---------------------+| |nbsp| :diagtext:`pointer`|+-------------+| |nbsp| :diagtext:`to void is a GNU extension`|
8226| || |nbsp| :diagtext:`a`|| || || |
8227| |+---------------------+| |+-------------+| |
8228| || || ||:diagtext:`s`|| |
8229| |+---------------------+| |+-------------+| |
8230+----------------------------------------------------+-----------------------+---------------------------+---------------+----------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008231
Richard Smithce9d5862016-09-14 01:51:10 +00008232+----------------------------------------------------+-----------------------+---------------------------+---------------+----------------------+-------------------------+---------------------------------+---------------+------------------------+---------------------------------------------------+--------------------------------------+
8233|:warning:`warning:` |nbsp| :diagtext:`arithmetic on`|+---------------------+| |nbsp| :diagtext:`pointer`|+-------------+| |nbsp| :diagtext:`to`|+-----------------------+| |nbsp| :diagtext:`function type`|+-------------+| |nbsp| :placeholder:`B`|+-------------------------------------------------+| |nbsp| :diagtext:`is a GNU extension`|
8234| || |nbsp| :diagtext:`a`|| || || || |nbsp| :diagtext:`the`|| || || || || |
8235| |+---------------------+| |+-------------+| |+-----------------------+| |+-------------+| |+-------------------------------------------------+| |
8236| || || ||:diagtext:`s`|| || || ||:diagtext:`s`|| ||+-----------------------------------------------+|| |
8237| |+---------------------+| |+-------------+| |+-----------------------+| |+-------------+| ||| |nbsp| :diagtext:`and` |nbsp| :placeholder:`D`||| |
8238| | | | | | | | | ||+-----------------------------------------------+|| |
8239| | | | | | | | | |+-------------------------------------------------+| |
8240+----------------------------------------------------+-----------------------+---------------------------+---------------+----------------------+-------------------------+---------------------------------+---------------+------------------------+---------------------------------------------------+--------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008241
Richard Smithce9d5862016-09-14 01:51:10 +00008242+-----------------------------------------------------------------------------------------------------------------------+
8243|:warning:`warning:` |nbsp| :diagtext:`ISO C does not support '++'/'--' on complex integer type` |nbsp| :placeholder:`A`|
8244+-----------------------------------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008245
Richard Smithce9d5862016-09-14 01:51:10 +00008246+--------------------------------------------------------------------------------------------------------------------+
8247|:warning:`warning:` |nbsp| :diagtext:`ISO C does not support '~' for complex conjugation of` |nbsp| :placeholder:`A`|
8248+--------------------------------------------------------------------------------------------------------------------+
8249
8250+------------------------------------------------------------------------------------------------------------+
8251|:warning:`warning:` |nbsp| :diagtext:`complex numbers are an extension in a freestanding C99 implementation`|
8252+------------------------------------------------------------------------------------------------------------+
8253
8254+-------------------------------------------------------------------------------------------------------------+
8255|:warning:`warning:` |nbsp| :diagtext:`cast between pointer-to-function and pointer-to-object is an extension`|
8256+-------------------------------------------------------------------------------------------------------------+
8257
8258+---------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------------------------------------------------+
8259|:warning:`warning:` |nbsp| :diagtext:`implicit conversion from array size expression of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| |+-----------------------+| |nbsp| :diagtext:`type` |nbsp| :placeholder:`C` |nbsp| :diagtext:`is a C++11 extension`|
8260| ||:diagtext:`integral` || |
8261| |+-----------------------+| |
8262| ||:diagtext:`enumeration`|| |
8263| |+-----------------------+| |
8264+---------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008265
8266+---------------------------+----------------------------------------------------------------+----------------------------------------------------------------------+
8267|:warning:`warning:` |nbsp| |+--------------------------------------------------------------+| |nbsp| :diagtext:`converts between void pointer and function pointer`|
8268| ||:diagtext:`assigning to different types` || |
8269| |+--------------------------------------------------------------+| |
8270| ||:diagtext:`passing to parameter of different type` || |
8271| |+--------------------------------------------------------------+| |
8272| ||:diagtext:`returning from function with different return type`|| |
8273| |+--------------------------------------------------------------+| |
8274| ||:diagtext:`converting between types` || |
8275| |+--------------------------------------------------------------+| |
8276| ||:diagtext:`initializing with expression of different type` || |
8277| |+--------------------------------------------------------------+| |
8278| ||:diagtext:`sending to parameter of different type` || |
8279| |+--------------------------------------------------------------+| |
8280| ||:diagtext:`casting between types` || |
8281| |+--------------------------------------------------------------+| |
8282+---------------------------+----------------------------------------------------------------+----------------------------------------------------------------------+
8283
Richard Smithce9d5862016-09-14 01:51:10 +00008284+--------------------------------------------------------------------------------------------------------------------------------------------------------+
8285|:warning:`warning:` |nbsp| :diagtext:`kernel function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a member function; this may not be accepted by nvcc`|
8286+--------------------------------------------------------------------------------------------------------------------------------------------------------+
8287
8288+--------------------------------------------------------------------------------------------------+
8289|:warning:`warning:` |nbsp| :diagtext:`C99 forbids conditional expressions with only one void side`|
8290+--------------------------------------------------------------------------------------------------+
8291
8292+-------------------------------------------------------------------------------------------------------------------------------------+
8293|:warning:`warning:` |nbsp| :diagtext:`C99 forbids casting nonscalar type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to the same type`|
8294+-------------------------------------------------------------------------------------------------------------------------------------+
8295
8296+---------------------------------------------------------------------------------------------------------------------------+
8297|:warning:`warning:` |nbsp| :diagtext:`use of the` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute is a C++14 extension`|
8298+---------------------------------------------------------------------------------------------------------------------------+
8299
8300+---------------------------------------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00008301|:warning:`warning:` |nbsp| :diagtext:`use of the` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute is a C++17 extension`|
Richard Smithce9d5862016-09-14 01:51:10 +00008302+---------------------------------------------------------------------------------------------------------------------------+
8303
8304+-----------------------------------------------------------------------------+--------------------+---------------------------------------------+
8305|:warning:`warning:` |nbsp| :diagtext:`types declared in an anonymous` |nbsp| |+------------------+| |nbsp| :diagtext:`are a Microsoft extension`|
8306| ||:diagtext:`struct`|| |
8307| |+------------------+| |
8308| ||:diagtext:`union` || |
8309| |+------------------+| |
8310+-----------------------------------------------------------------------------+--------------------+---------------------------------------------+
8311
8312+---------------------------------------------------+----------------------+-----------------------------------------------------------------------------+
8313|:warning:`warning:` |nbsp| :diagtext:`void` |nbsp| |+--------------------+| |nbsp| :placeholder:`A` |nbsp| :diagtext:`should not return void expression`|
8314| ||:diagtext:`function`|| |
8315| |+--------------------+| |
8316| ||:diagtext:`method` || |
8317| |+--------------------+| |
8318| ||:diagtext:`block` || |
8319| |+--------------------+| |
8320+---------------------------------------------------+----------------------+-----------------------------------------------------------------------------+
8321
8322+--------------------------------------------------------------------------------------------------+
8323|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' cannot be signed or unsigned`|
8324+--------------------------------------------------------------------------------------------------+
8325
8326+---------------------------+----------------------------------+------------------------------+-----------------------+----------------------------+
8327|:warning:`warning:` |nbsp| |+--------------------------------+|:diagtext:`array size` |nbsp| |+---------------------+|:diagtext:`is a C99 feature`|
8328| ||:diagtext:`qualifier in` |nbsp| || || || |
8329| |+--------------------------------+| |+---------------------+| |
8330| ||:diagtext:`static` |nbsp| || || || |
8331| |+--------------------------------+| |+---------------------+| |
8332| || || ||:diagtext:`'\[\*\] '`|| |
8333| |+--------------------------------+| |+---------------------+| |
8334+---------------------------+----------------------------------+------------------------------+-----------------------+----------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008335
8336+--------------------------------------------------------+------------------------------------------------+
8337|:warning:`warning:` |nbsp| :diagtext:`extra ';'` |nbsp| |+----------------------------------------------+|
8338| ||:diagtext:`outside of a function` ||
8339| |+----------------------------------------------+|
8340| ||+--------------------------------------------+||
8341| |||:diagtext:`inside a` |nbsp| :placeholder:`B`|||
8342| ||+--------------------------------------------+||
8343| |+----------------------------------------------+|
8344| ||:diagtext:`inside instance variable list` ||
8345| |+----------------------------------------------+|
8346| ||:diagtext:`after member function definition` ||
8347| |+----------------------------------------------+|
8348+--------------------------------------------------------+------------------------------------------------+
8349
Richard Smithce9d5862016-09-14 01:51:10 +00008350+-----------------------------------------------------------------------------------------+
8351|:warning:`warning:` |nbsp| :diagtext:`'\_\_thread' before '`:placeholder:`A`:diagtext:`'`|
8352+-----------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008353
8354+----------------------------------------------------------------------------------------+
Richard Smithce9d5862016-09-14 01:51:10 +00008355|:warning:`warning:` |nbsp| :diagtext:`type-less parameter names in function declaration`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008356+----------------------------------------------------------------------------------------+
8357
Richard Smithce9d5862016-09-14 01:51:10 +00008358+-------------------------------------------------------------------------------------------------+
8359|:warning:`warning:` |nbsp| :diagtext:`variable declaration in for loop is a C99-specific feature`|
8360+-------------------------------------------------------------------------------------------------+
8361
8362+-----------------------------------------------------------------------------------+
8363|:warning:`warning:` |nbsp| :diagtext:`compound literals are a C99-specific feature`|
8364+-----------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008365
8366+-------------------------------------------------------------------------------------------------------+
8367|:warning:`warning:` |nbsp| :diagtext:`commas at the end of enumerator lists are a C99-specific feature`|
8368+-------------------------------------------------------------------------------------------------------+
8369
Richard Smithce9d5862016-09-14 01:51:10 +00008370+--------------------------------------------------------------------------------------------------+
8371|:warning:`warning:` |nbsp| :diagtext:`commas at the end of enumerator lists are a C++11 extension`|
8372+--------------------------------------------------------------------------------------------------+
8373
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008374+-----------------------------------------------------------------------------------------------------------+
8375|:warning:`warning:` |nbsp| :diagtext:`enumeration types with a fixed underlying type are a C++11 extension`|
8376+-----------------------------------------------------------------------------------------------------------+
8377
Richard Smithce9d5862016-09-14 01:51:10 +00008378+-----------------------------------------------------------------------+
8379|:warning:`warning:` |nbsp| :diagtext:`use of GNU array range extension`|
8380+-----------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008381
Richard Smithce9d5862016-09-14 01:51:10 +00008382+------------------------------------------------------------------------------------------------+
8383|:warning:`warning:` |nbsp| :diagtext:`exception specification of '...' is a Microsoft extension`|
8384+------------------------------------------------------------------------------------------------+
8385
Richard Smith66310362017-10-26 21:06:52 +00008386+------------------------------------------------------------+---------------------------+-----------------------------------------------------+
8387|:warning:`warning:` |nbsp| :diagtext:`attributes on` |nbsp| |+-------------------------+| |nbsp| :diagtext:`declaration are a C++17 extension`|
8388| ||:diagtext:`a namespace` || |
8389| |+-------------------------+| |
8390| ||:diagtext:`an enumerator`|| |
8391| |+-------------------------+| |
8392+------------------------------------------------------------+---------------------------+-----------------------------------------------------+
8393
Richard Smithce9d5862016-09-14 01:51:10 +00008394+-----------------------------------------------------------------------------+
8395|:warning:`warning:` |nbsp| :diagtext:`extern templates are a C++11 extension`|
8396+-----------------------------------------------------------------------------+
8397
8398+------------------------------------------------------------+
8399|:warning:`warning:` |nbsp| :diagtext:`multi-line // comment`|
8400+------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008401
8402+-----------------------------------------------------------------------------------+
8403|:warning:`warning:` |nbsp| :diagtext:`// comments are not allowed in this language`|
8404+-----------------------------------------------------------------------------------+
8405
Richard Smithce9d5862016-09-14 01:51:10 +00008406+----------------------------------------------------------------+
8407|:warning:`warning:` |nbsp| :diagtext:`no newline at end of file`|
8408+----------------------------------------------------------------+
8409
8410+------------------------------------------------------------------------------------------------------------+
8411|:warning:`warning:` |nbsp| :diagtext:`use of non-standard escape character '\\`:placeholder:`A`:diagtext:`'`|
8412+------------------------------------------------------------------------------------------------------------+
8413
8414+---------------------------------------------------------------------------------------+
8415|:warning:`warning:` |nbsp| :diagtext:`hexadecimal floating constants are a C99 feature`|
8416+---------------------------------------------------------------------------------------+
8417
8418+----------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00008419|:warning:`warning:` |nbsp| :diagtext:`hexadecimal floating literals are a C++17 feature`|
Richard Smithce9d5862016-09-14 01:51:10 +00008420+----------------------------------------------------------------------------------------+
8421
8422+---------------------------------------------------------------------+
8423|:warning:`warning:` |nbsp| :diagtext:`#ident is a language extension`|
8424+---------------------------------------------------------------------+
8425
8426+-----------------------------------------------------------------------+
8427|:warning:`warning:` |nbsp| :diagtext:`#warning is a language extension`|
8428+-----------------------------------------------------------------------+
8429
8430+-----------------------------------------------------------------------+
8431|:warning:`warning:` |nbsp| :diagtext:`comma operator in operand of #if`|
8432+-----------------------------------------------------------------------+
8433
8434+----------------------------------------------------------------------------------------------------------------+
8435|:warning:`warning:` |nbsp| :diagtext:`\_\_VA\_ARGS\_\_ can only appear in the expansion of a C99 variadic macro`|
8436+----------------------------------------------------------------------------------------------------------------+
8437
Richard Smith66310362017-10-26 21:06:52 +00008438+------------------------------------------------------------------------+
8439|:warning:`warning:` |nbsp| :diagtext:`variadic macros are a C99 feature`|
8440+------------------------------------------------------------------------+
8441
8442+--------------------------------------------------------------------------------+
8443|:warning:`warning:` |nbsp| :diagtext:`named variadic macros are a GNU extension`|
8444+--------------------------------------------------------------------------------+
8445
Richard Smithce9d5862016-09-14 01:51:10 +00008446+------------------------------------------------------------------------------+
8447|:warning:`warning:` |nbsp| :diagtext:`empty macro arguments are a C99 feature`|
8448+------------------------------------------------------------------------------+
8449
8450+----------------------------------------------------------------------------------------------------------------------------------------+
8451|:warning:`warning:` |nbsp| :diagtext:`C requires #line number to be less than` |nbsp| :placeholder:`A`:diagtext:`, allowed as extension`|
8452+----------------------------------------------------------------------------------------------------------------------------------------+
8453
8454+-------------------------------------------------------------------------------------------------+
8455|:warning:`warning:` |nbsp| :diagtext:`macro expansion producing 'defined' has undefined behavior`|
8456+-------------------------------------------------------------------------------------------------+
8457
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008458
8459-Wpedantic-core-features
8460------------------------
8461**Diagnostic text:**
8462
8463+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
8464|:warning:`warning:` |nbsp| :diagtext:`OpenCL extension` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is core feature or supported optional core feature - ignoring`|
8465+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
8466
8467
8468-Wpessimizing-move
8469------------------
8470**Diagnostic text:**
8471
8472+--------------------------------------------------------------------------------------+
8473|:warning:`warning:` |nbsp| :diagtext:`moving a temporary object prevents copy elision`|
8474+--------------------------------------------------------------------------------------+
8475
8476+--------------------------------------------------------------------------------------------------------+
8477|:warning:`warning:` |nbsp| :diagtext:`moving a local object in a return statement prevents copy elision`|
8478+--------------------------------------------------------------------------------------------------------+
8479
8480
8481-Wpointer-arith
8482---------------
8483Some of the diagnostics controlled by this flag are enabled by default.
8484
8485**Diagnostic text:**
8486
8487+----------------------------------------------------+-----------------------+---------------------------+---------------+----------------------+-------------------------+---------------------------------+---------------+------------------------+---------------------------------------------------+--------------------------------------+
8488|:warning:`warning:` |nbsp| :diagtext:`arithmetic on`|+---------------------+| |nbsp| :diagtext:`pointer`|+-------------+| |nbsp| :diagtext:`to`|+-----------------------+| |nbsp| :diagtext:`function type`|+-------------+| |nbsp| :placeholder:`B`|+-------------------------------------------------+| |nbsp| :diagtext:`is a GNU extension`|
8489| || |nbsp| :diagtext:`a`|| || || || |nbsp| :diagtext:`the`|| || || || || |
8490| |+---------------------+| |+-------------+| |+-----------------------+| |+-------------+| |+-------------------------------------------------+| |
8491| || || ||:diagtext:`s`|| || || ||:diagtext:`s`|| ||+-----------------------------------------------+|| |
8492| |+---------------------+| |+-------------+| |+-----------------------+| |+-------------+| ||| |nbsp| :diagtext:`and` |nbsp| :placeholder:`D`||| |
8493| | | | | | | | | ||+-----------------------------------------------+|| |
8494| | | | | | | | | |+-------------------------------------------------+| |
8495+----------------------------------------------------+-----------------------+---------------------------+---------------+----------------------+-------------------------+---------------------------------+---------------+------------------------+---------------------------------------------------+--------------------------------------+
8496
8497+----------------------------------------------------------------------------------------+
8498|:warning:`warning:` |nbsp| :diagtext:`subscript of a pointer to void is a GNU extension`|
8499+----------------------------------------------------------------------------------------+
8500
8501+----------------------------------------------------+-----------------------+---------------------------+---------------+----------------------------------------------+
8502|:warning:`warning:` |nbsp| :diagtext:`arithmetic on`|+---------------------+| |nbsp| :diagtext:`pointer`|+-------------+| |nbsp| :diagtext:`to void is a GNU extension`|
8503| || |nbsp| :diagtext:`a`|| || || |
8504| |+---------------------+| |+-------------+| |
8505| || || ||:diagtext:`s`|| |
8506| |+---------------------+| |+-------------+| |
8507+----------------------------------------------------+-----------------------+---------------------------+---------------+----------------------------------------------+
8508
8509+---------------------------------------------------------------+-----------------------+--------------------------------+
8510|:warning:`warning:` |nbsp| :diagtext:`invalid application of '`|+---------------------+|:diagtext:`' to a function type`|
8511| ||:diagtext:`sizeof` || |
8512| |+---------------------+| |
8513| ||:diagtext:`alignof` || |
8514| |+---------------------+| |
8515| ||:diagtext:`vec\_step`|| |
8516| |+---------------------+| |
8517+---------------------------------------------------------------+-----------------------+--------------------------------+
8518
8519+---------------------------------------------------------------+-----------------------+----------------------------+
8520|:warning:`warning:` |nbsp| :diagtext:`invalid application of '`|+---------------------+|:diagtext:`' to a void type`|
8521| ||:diagtext:`sizeof` || |
8522| |+---------------------+| |
8523| ||:diagtext:`alignof` || |
8524| |+---------------------+| |
8525| ||:diagtext:`vec\_step`|| |
8526| |+---------------------+| |
8527+---------------------------------------------------------------+-----------------------+----------------------------+
8528
8529+-----------------------------------------------------------------------------------------------------------------------------------------------------+
8530|:warning:`warning:` |nbsp| :diagtext:`subtraction of pointers to type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`of zero size has undefined behavior`|
8531+-----------------------------------------------------------------------------------------------------------------------------------------------------+
8532
8533
8534-Wpointer-bool-conversion
8535-------------------------
8536This diagnostic is enabled by default.
8537
8538**Diagnostic text:**
8539
8540+------------------------------------------------------+---------------------------+---------------------------------------------------------------------------------------------+
8541|:warning:`warning:` |nbsp| :diagtext:`nonnull` |nbsp| |+-------------------------+| |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' will evaluate to 'true' on first encounter`|
8542| ||:diagtext:`function call`|| |
8543| |+-------------------------+| |
8544| ||:diagtext:`parameter` || |
8545| |+-------------------------+| |
8546+------------------------------------------------------+---------------------------+---------------------------------------------------------------------------------------------+
8547
8548+-------------------------------------------------+------------------------------+---------------------------------------------------------------------------------+
8549|:warning:`warning:` |nbsp| :diagtext:`address of`|+----------------------------+| |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' will always evaluate to 'true'`|
8550| || || |
8551| |+----------------------------+| |
8552| || |nbsp| :diagtext:`function`|| |
8553| |+----------------------------+| |
8554| || |nbsp| :diagtext:`array` || |
8555| |+----------------------------+| |
8556+-------------------------------------------------+------------------------------+---------------------------------------------------------------------------------+
8557
8558
8559-Wpointer-sign
8560--------------
8561This diagnostic is enabled by default.
8562
8563**Diagnostic text:**
8564
8565+---------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------+
8566|:warning:`warning:` |nbsp| |+--------------------------------------------------------------+| |nbsp| :diagtext:`converts between pointers to integer types with different sign`|
8567| ||:diagtext:`assigning to different types` || |
8568| |+--------------------------------------------------------------+| |
8569| ||:diagtext:`passing to parameter of different type` || |
8570| |+--------------------------------------------------------------+| |
8571| ||:diagtext:`returning from function with different return type`|| |
8572| |+--------------------------------------------------------------+| |
8573| ||:diagtext:`converting between types` || |
8574| |+--------------------------------------------------------------+| |
8575| ||:diagtext:`initializing with expression of different type` || |
8576| |+--------------------------------------------------------------+| |
8577| ||:diagtext:`sending to parameter of different type` || |
8578| |+--------------------------------------------------------------+| |
8579| ||:diagtext:`casting between types` || |
8580| |+--------------------------------------------------------------+| |
8581+---------------------------+----------------------------------------------------------------+----------------------------------------------------------------------------------+
8582
8583
8584-Wpointer-to-int-cast
8585---------------------
8586This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
8587
8588-Wpointer-type-mismatch
8589-----------------------
8590This diagnostic is enabled by default.
8591
8592**Diagnostic text:**
8593
8594+------------------------------------------------------------+
8595|:warning:`warning:` |nbsp| :diagtext:`pointer type mismatch`|
8596+------------------------------------------------------------+
8597
8598
8599-Wpotentially-evaluated-expression
8600----------------------------------
8601This diagnostic is enabled by default.
8602
8603**Diagnostic text:**
8604
8605+----------------------------------------------------------------------------------------------------------------------------------+
8606|:warning:`warning:` |nbsp| :diagtext:`expression with side effects will be evaluated despite being used as an operand to 'typeid'`|
8607+----------------------------------------------------------------------------------------------------------------------------------+
8608
8609
Richard Smith66310362017-10-26 21:06:52 +00008610-Wpragma-clang-attribute
8611------------------------
8612This diagnostic is enabled by default.
8613
8614**Diagnostic text:**
8615
8616+-------------------------------------------------------------------------------------------------------------------------------------------+
8617|:warning:`warning:` |nbsp| :diagtext:`unused attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in '#pragma clang attribute push' region`|
8618+-------------------------------------------------------------------------------------------------------------------------------------------+
8619
8620
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008621-Wpragma-once-outside-header
8622----------------------------
8623This diagnostic is enabled by default.
8624
8625**Diagnostic text:**
8626
8627+----------------------------------------------------------------+
8628|:warning:`warning:` |nbsp| :diagtext:`#pragma once in main file`|
8629+----------------------------------------------------------------+
8630
8631
Richard Smith66310362017-10-26 21:06:52 +00008632-Wpragma-pack
8633-------------
8634Some of the diagnostics controlled by this flag are enabled by default.
8635
8636Also controls `-Wpragma-pack-suspicious-include`_.
8637
8638**Diagnostic text:**
8639
8640+---------------------------------------------------------------------------------------------------------------+
8641|:warning:`warning:` |nbsp| :diagtext:`the current #pragma pack aligment value is modified in the included file`|
8642+---------------------------------------------------------------------------------------------------------------+
8643
8644+---------------------------------------------------------------------------------------------+
8645|:warning:`warning:` |nbsp| :diagtext:`unterminated '#pragma pack (push, ...)' at end of file`|
8646+---------------------------------------------------------------------------------------------+
8647
8648
8649-Wpragma-pack-suspicious-include
8650--------------------------------
8651**Diagnostic text:**
8652
8653+-------------------------------------------------------------------------------------------------------------------------------------------+
8654|:warning:`warning:` |nbsp| :diagtext:`non-default #pragma pack value changes the alignment of struct or union members in the included file`|
8655+-------------------------------------------------------------------------------------------------------------------------------------------+
8656
8657
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008658-Wpragma-system-header-outside-header
8659-------------------------------------
8660This diagnostic is enabled by default.
8661
8662**Diagnostic text:**
8663
8664+----------------------------------------------------------------------------------+
8665|:warning:`warning:` |nbsp| :diagtext:`#pragma system\_header ignored in main file`|
8666+----------------------------------------------------------------------------------+
8667
8668
8669-Wpragmas
8670---------
8671Some of the diagnostics controlled by this flag are enabled by default.
8672
Richard Smith66310362017-10-26 21:06:52 +00008673Also controls `-Wignored-pragmas`_, `-Wpragma-clang-attribute`_, `-Wpragma-pack`_, `-Wunknown-pragmas`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008674
8675**Diagnostic text:**
8676
8677+--------------------------------------------------------------------------------------------------------------------------------------+----------------------+------------------------+
8678|:warning:`warning:` |nbsp| :diagtext:`#pragma redefine\_extname is applicable to external C declarations only; not applied to` |nbsp| |+--------------------+| |nbsp| :placeholder:`B`|
8679| ||:diagtext:`function`|| |
8680| |+--------------------+| |
8681| ||:diagtext:`variable`|| |
8682| |+--------------------+| |
8683+--------------------------------------------------------------------------------------------------------------------------------------+----------------------+------------------------+
8684
8685
8686-Wpredefined-identifier-outside-function
8687----------------------------------------
8688This diagnostic is enabled by default.
8689
8690**Diagnostic text:**
8691
8692+------------------------------------------------------------------------------------------+
8693|:warning:`warning:` |nbsp| :diagtext:`predefined identifier is only valid inside function`|
8694+------------------------------------------------------------------------------------------+
8695
8696
8697-Wprivate-extern
8698----------------
8699This diagnostic is enabled by default.
8700
8701**Diagnostic text:**
8702
8703+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8704|:warning:`warning:` |nbsp| :diagtext:`use of \_\_private\_extern\_\_ on a declaration may not produce external symbol private to the linkage unit and is deprecated`|
8705+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8706
8707
8708-Wprivate-header
8709----------------
8710This diagnostic is an error by default, but the flag ``-Wno-private-header`` can be used to disable the error.
8711
8712**Diagnostic text:**
8713
8714+----------------------------------------------------------------------------------------------------------------+
8715|:error:`error:` |nbsp| :diagtext:`use of private header from outside its module: '`:placeholder:`A`:diagtext:`'`|
8716+----------------------------------------------------------------------------------------------------------------+
8717
8718
Richard Smithcf9f4222017-01-20 19:27:09 +00008719-Wprivate-module
8720----------------
8721This diagnostic is enabled by default.
8722
8723**Diagnostic text:**
8724
8725+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8726|:warning:`warning:` |nbsp| :diagtext:`top-level module '`:placeholder:`A`:diagtext:`' in private module map, expected a submodule of '`:placeholder:`B`:diagtext:`'`|
8727+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8728
Richard Smith66310362017-10-26 21:06:52 +00008729+----------------------------------------------------------------------------------------------------------------------------------+
8730|:warning:`warning:` |nbsp| :diagtext:`module '`:placeholder:`A`:diagtext:`' already re-exported as '`:placeholder:`B`:diagtext:`'`|
8731+----------------------------------------------------------------------------------------------------------------------------------+
8732
8733
8734-Wprofile-instr-missing
8735-----------------------
8736**Diagnostic text:**
8737
8738+-----------------------------------------------------------------------------------------------------------------------------+---------------+---------------------------------------------+-------------------+---------------------------+
8739|:warning:`warning:` |nbsp| :diagtext:`profile data may be incomplete: of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`function`|+-------------+|:diagtext:`,` |nbsp| :placeholder:`B` |nbsp| |+-----------------+| |nbsp| :diagtext:`no data`|
8740| || || ||:diagtext:`:has` || |
8741| |+-------------+| |+-----------------+| |
8742| ||:diagtext:`s`|| ||:diagtext:`:have`|| |
8743| |+-------------+| |+-----------------+| |
8744+-----------------------------------------------------------------------------------------------------------------------------+---------------+---------------------------------------------+-------------------+---------------------------+
8745
Richard Smithcf9f4222017-01-20 19:27:09 +00008746
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008747-Wprofile-instr-out-of-date
8748---------------------------
8749This diagnostic is enabled by default.
8750
8751**Diagnostic text:**
8752
Richard Smith66310362017-10-26 21:06:52 +00008753+------------------------------------------------------------------------------------------------------------------------------+---------------+---------------------------------------------+-------------------+--------------------------------------------------------+
8754|:warning:`warning:` |nbsp| :diagtext:`profile data may be out of date: of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`function`|+-------------+|:diagtext:`,` |nbsp| :placeholder:`B` |nbsp| |+-----------------+| |nbsp| :diagtext:`mismatched data that will be ignored`|
8755| || || ||:diagtext:`:has` || |
8756| |+-------------+| |+-----------------+| |
8757| ||:diagtext:`s`|| ||:diagtext:`:have`|| |
8758| |+-------------+| |+-----------------+| |
8759+------------------------------------------------------------------------------------------------------------------------------+---------------+---------------------------------------------+-------------------+--------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008760
8761
8762-Wprofile-instr-unprofiled
8763--------------------------
8764This diagnostic is enabled by default.
8765
8766**Diagnostic text:**
8767
8768+--------------------------------------------------------------------------------------------------------+
8769|:warning:`warning:` |nbsp| :diagtext:`no profile data available for file "`:placeholder:`A`:diagtext:`"`|
8770+--------------------------------------------------------------------------------------------------------+
8771
8772
8773-Wproperty-access-dot-syntax
8774----------------------------
8775This diagnostic is enabled by default.
8776
8777**Diagnostic text:**
8778
8779+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8780|:warning:`warning:` |nbsp| :diagtext:`property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`not found on object of type` |nbsp| :placeholder:`B`:diagtext:`; did you mean to access property` |nbsp| :placeholder:`C`:diagtext:`?`|
8781+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8782
8783
8784-Wproperty-attribute-mismatch
8785-----------------------------
8786This diagnostic is enabled by default.
8787
8788**Diagnostic text:**
8789
8790+-------------------------------------------------------------------------------------------------------------+
8791|:warning:`warning:` |nbsp| :diagtext:`property attribute in class extension does not match the primary class`|
8792+-------------------------------------------------------------------------------------------------------------+
8793
8794+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8795|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' attribute on property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`does not match the property inherited from` |nbsp| :placeholder:`C`|
8796+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8797
8798+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8799|:warning:`warning:` |nbsp| :diagtext:`getter name mismatch between property redeclaration (`:placeholder:`B`:diagtext:`) and its original declaration (`:placeholder:`A`:diagtext:`)`|
8800+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8801
8802+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8803|:warning:`warning:` |nbsp| :diagtext:`attribute 'readonly' of property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`restricts attribute 'readwrite' of property inherited from` |nbsp| :placeholder:`B`|
8804+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8805
8806
8807-Wprotocol
8808----------
8809This diagnostic is enabled by default.
8810
8811**Diagnostic text:**
8812
8813+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
8814|:warning:`warning:` |nbsp| :diagtext:`method` |nbsp| :placeholder:`A` |nbsp| :diagtext:`in protocol` |nbsp| :placeholder:`B` |nbsp| :diagtext:`not implemented`|
8815+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
8816
8817
8818-Wprotocol-property-synthesis-ambiguity
8819---------------------------------------
8820This diagnostic is enabled by default.
8821
8822**Diagnostic text:**
8823
Richard Smith66310362017-10-26 21:06:52 +00008824+-------------------------------------------------------+----------------------------------------------------------------+----------------------------------------------+
8825|:warning:`warning:` |nbsp| :diagtext:`property` |nbsp| |+--------------------------------------------------------------+| |nbsp| :diagtext:`was selected for synthesis`|
8826| ||+-------------------------------------------+ || |
8827| |||:diagtext:`of type` |nbsp| :placeholder:`B`| || |
8828| ||+-------------------------------------------+ || |
8829| |+--------------------------------------------------------------+| |
8830| ||+---------------------------------------------------------+ || |
8831| |||:diagtext:`with attribute '`:placeholder:`B`:diagtext:`'`| || |
8832| ||+---------------------------------------------------------+ || |
8833| |+--------------------------------------------------------------+| |
8834| ||+------------------------------------------------------------+|| |
8835| |||:diagtext:`without attribute '`:placeholder:`B`:diagtext:`'`||| |
8836| ||+------------------------------------------------------------+|| |
8837| |+--------------------------------------------------------------+| |
8838| ||+-----------------------------------------------+ || |
8839| |||:diagtext:`with getter` |nbsp| :placeholder:`B`| || |
8840| ||+-----------------------------------------------+ || |
8841| |+--------------------------------------------------------------+| |
8842| ||+-----------------------------------------------+ || |
8843| |||:diagtext:`with setter` |nbsp| :placeholder:`B`| || |
8844| ||+-----------------------------------------------+ || |
8845| |+--------------------------------------------------------------+| |
8846+-------------------------------------------------------+----------------------------------------------------------------+----------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008847
8848
8849-Wqualified-void-return-type
8850----------------------------
8851This diagnostic is enabled by default.
8852
8853**Diagnostic text:**
8854
8855+---------------------------------------------------------------------------------------------------------+
8856|:warning:`warning:` |nbsp| :diagtext:`function cannot return qualified void type` |nbsp| :placeholder:`A`|
8857+---------------------------------------------------------------------------------------------------------+
8858
8859
8860-Wrange-loop-analysis
8861---------------------
8862**Diagnostic text:**
8863
8864+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8865|:warning:`warning:` |nbsp| :diagtext:`loop variable` |nbsp| :placeholder:`A` |nbsp| |nbsp| :diagtext:`is initialized with a value of a different type` |nbsp| :diagtext:`resulting in a copy`|
8866+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8867
8868+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8869|:warning:`warning:` |nbsp| :diagtext:`loop variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`of type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`creates a copy from type` |nbsp| :placeholder:`C`|
8870+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8871
8872+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8873|:warning:`warning:` |nbsp| :diagtext:`loop variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is always a copy because the range of type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`does not return a reference`|
8874+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8875
8876
8877-Wreadonly-iboutlet-property
8878----------------------------
8879This diagnostic is enabled by default.
8880
8881**Diagnostic text:**
8882
8883+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8884|:warning:`warning:` |nbsp| :diagtext:`readonly IBOutlet property` |nbsp| :placeholder:`A` |nbsp| :diagtext:`when auto-synthesized may not work correctly with 'nib' loader`|
8885+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8886
8887
8888-Wreceiver-expr
8889---------------
8890This diagnostic is enabled by default.
8891
8892**Diagnostic text:**
8893
8894+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
8895|:warning:`warning:` |nbsp| :diagtext:`receiver type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not 'id' or interface pointer, consider casting it to 'id'`|
8896+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
8897
8898
8899-Wreceiver-forward-class
8900------------------------
8901Some of the diagnostics controlled by this flag are enabled by default.
8902
8903**Diagnostic text:**
8904
8905+--------------------------------------------------------------------------------------------------------------------------------------------------------+
8906|:warning:`warning:` |nbsp| :diagtext:`receiver` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a forward class and corresponding @interface may not exist`|
8907+--------------------------------------------------------------------------------------------------------------------------------------------------------+
8908
8909+---------------------------------------------------------------------------------------------------------------------------------------------+
8910|:warning:`warning:` |nbsp| :diagtext:`receiver type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`for instance message is a forward declaration`|
8911+---------------------------------------------------------------------------------------------------------------------------------------------+
8912
8913
8914-Wredeclared-class-member
8915-------------------------
8916This diagnostic is enabled by default.
8917
8918**Diagnostic text:**
8919
8920+------------------------------------------------------------------------+
8921|:warning:`warning:` |nbsp| :diagtext:`class member cannot be redeclared`|
8922+------------------------------------------------------------------------+
8923
8924
8925-Wredundant-decls
8926-----------------
8927This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
8928
8929-Wredundant-move
8930----------------
8931**Diagnostic text:**
8932
8933+-------------------------------------------------------------------------+
8934|:warning:`warning:` |nbsp| :diagtext:`redundant move in return statement`|
8935+-------------------------------------------------------------------------+
8936
8937
Richard Smith66310362017-10-26 21:06:52 +00008938-Wredundant-parens
8939------------------
8940**Diagnostic text:**
8941
8942+-----------------------------------------------------------------------------------+
8943|:warning:`warning:` |nbsp| :diagtext:`redundant parentheses surrounding declarator`|
8944+-----------------------------------------------------------------------------------+
8945
8946
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008947-Wregister
8948----------
8949This diagnostic is enabled by default.
8950
8951Also controls `-Wdeprecated-register`_.
8952
8953**Diagnostic text:**
8954
8955+----------------------------------------------------------------------------------------------+
Richard Smith66310362017-10-26 21:06:52 +00008956|:error:`error:` |nbsp| :diagtext:`ISO C++17 does not allow 'register' storage class specifier`|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00008957+----------------------------------------------------------------------------------------------+
8958
8959
8960-Wreinterpret-base-class
8961------------------------
8962This diagnostic is enabled by default.
8963
8964**Diagnostic text:**
8965
8966+------------------------------------------------------------------+------------------+---------------------------------------------------------+------------------+-------------------------------+-------------------------------------+-----------------------------------------------------------------------------------+
8967|:warning:`warning:` |nbsp| :diagtext:`'reinterpret\_cast'` |nbsp| |+----------------+| |nbsp| :diagtext:`class` |nbsp| :placeholder:`A` |nbsp| |+----------------+| |nbsp| :diagtext:`its` |nbsp| |+-----------------------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`behaves differently from 'static\_cast'`|
8968| ||:diagtext:`from`|| ||:diagtext:`to` || ||:diagtext:`virtual base` || |
8969| |+----------------+| |+----------------+| |+-----------------------------------+| |
8970| ||:diagtext:`to` || ||:diagtext:`from`|| ||:diagtext:`base at non-zero offset`|| |
8971| |+----------------+| |+----------------+| |+-----------------------------------+| |
8972+------------------------------------------------------------------+------------------+---------------------------------------------------------+------------------+-------------------------------+-------------------------------------+-----------------------------------------------------------------------------------+
8973
8974
8975-Rremark-backend-plugin
8976-----------------------
8977**Diagnostic text:**
8978
8979The text of this diagnostic is not controlled by Clang.
8980
8981
8982-Wreorder
8983---------
8984**Diagnostic text:**
8985
8986+---------------------------+------------------------+-----------------------------------------------------------------------------+-------------------+------------------------+
8987|:warning:`warning:` |nbsp| |+----------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`will be initialized after` |nbsp| |+-----------------+| |nbsp| :placeholder:`D`|
8988| ||:diagtext:`field` || ||:diagtext:`field`|| |
8989| |+----------------------+| |+-----------------+| |
8990| ||:diagtext:`base class`|| ||:diagtext:`base` || |
8991| |+----------------------+| |+-----------------+| |
8992+---------------------------+------------------------+-----------------------------------------------------------------------------+-------------------+------------------------+
8993
8994
8995-Wrequires-super-attribute
8996--------------------------
8997This diagnostic is enabled by default.
8998
8999**Diagnostic text:**
9000
9001+-----------------------------------------------------------------------------------------------------+----------------------------------+
9002|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute cannot be applied to` |nbsp| |+--------------------------------+|
9003| ||:diagtext:`methods in protocols`||
9004| |+--------------------------------+|
9005| ||:diagtext:`dealloc` ||
9006| |+--------------------------------+|
9007+-----------------------------------------------------------------------------------------------------+----------------------------------+
9008
9009
9010-Wreserved-id-macro
9011-------------------
9012**Diagnostic text:**
9013
9014+--------------------------------------------------------------------------+
9015|:warning:`warning:` |nbsp| :diagtext:`macro name is a reserved identifier`|
9016+--------------------------------------------------------------------------+
9017
9018
9019-Wreserved-user-defined-literal
9020-------------------------------
9021Some of the diagnostics controlled by this flag are enabled by default.
9022
9023Also controls `-Wc++11-compat-reserved-user-defined-literal`_.
9024
9025**Diagnostic text:**
9026
9027+-----------------------------------------------------------------------------------------------------------------------+
9028|:warning:`warning:` |nbsp| :diagtext:`invalid suffix on literal; C++11 requires a space between literal and identifier`|
9029+-----------------------------------------------------------------------------------------------------------------------+
9030
9031+-------------------------------------------------------------------------------------------------------------------+
9032|:error:`error:` |nbsp| :diagtext:`invalid suffix on literal; C++11 requires a space between literal and identifier`|
9033+-------------------------------------------------------------------------------------------------------------------+
9034
9035
9036-Wretained-language-linkage
9037---------------------------
9038**Diagnostic text:**
9039
9040+-----------------------------------------------------------------------------------------------------------------------------------------------------+
9041|:warning:`warning:` |nbsp| :diagtext:`friend function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`retaining previous language linkage is an extension`|
9042+-----------------------------------------------------------------------------------------------------------------------------------------------------+
9043
9044
9045-Wreturn-stack-address
9046----------------------
9047This diagnostic is enabled by default.
9048
9049**Diagnostic text:**
9050
9051+---------------------------------------------------------------------------------+
9052|:warning:`warning:` |nbsp| :diagtext:`returning address of label, which is local`|
9053+---------------------------------------------------------------------------------+
9054
9055+--------------------------------------------------------+--------------------------+------------------------------------------+
9056|:warning:`warning:` |nbsp| :diagtext:`returning` |nbsp| |+------------------------+| |nbsp| :diagtext:`local temporary object`|
9057| ||:diagtext:`address of` || |
9058| |+------------------------+| |
9059| ||:diagtext:`reference to`|| |
9060| |+------------------------+| |
9061+--------------------------------------------------------+--------------------------+------------------------------------------+
9062
9063+---------------------------+--------------------------+-------------------------------------------------------------------------------------------------------------------+
9064|:warning:`warning:` |nbsp| |+------------------------+| |nbsp| :diagtext:`stack memory associated with local variable` |nbsp| :placeholder:`B` |nbsp| :diagtext:`returned`|
9065| ||:diagtext:`address of` || |
9066| |+------------------------+| |
9067| ||:diagtext:`reference to`|| |
9068| |+------------------------+| |
9069+---------------------------+--------------------------+-------------------------------------------------------------------------------------------------------------------+
9070
9071
9072-Wreturn-type
9073-------------
9074This diagnostic is enabled by default.
9075
9076Also controls `-Wreturn-type-c-linkage`_.
9077
9078**Diagnostic text:**
9079
9080+-----------------------+---------------------------+---------------------------------------------------------------------+
9081|:error:`error:` |nbsp| |+-------------------------+| |nbsp| :placeholder:`A` |nbsp| :diagtext:`should not return a value`|
9082| ||:diagtext:`void function`|| |
9083| |+-------------------------+| |
9084| ||:diagtext:`void method` || |
9085| |+-------------------------+| |
9086| ||:diagtext:`constructor` || |
9087| |+-------------------------+| |
9088| ||:diagtext:`destructor` || |
9089| |+-------------------------+| |
9090+-----------------------+---------------------------+---------------------------------------------------------------------+
9091
9092+---------------------------------------------------+----------------------+-----------------------------------------------------------------+
9093|:error:`error:` |nbsp| :diagtext:`non-void` |nbsp| |+--------------------+| |nbsp| :placeholder:`A` |nbsp| :diagtext:`should return a value`|
9094| ||:diagtext:`function`|| |
9095| |+--------------------+| |
9096| ||:diagtext:`method` || |
9097| |+--------------------+| |
9098+---------------------------------------------------+----------------------+-----------------------------------------------------------------+
9099
Richard Smith66310362017-10-26 21:06:52 +00009100+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9101|:warning:`warning:` |nbsp| :diagtext:`control reaches end of coroutine; which is undefined behavior because the promise type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`does not declare 'return\_void()'`|
9102+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smithcf9f4222017-01-20 19:27:09 +00009103
Richard Smithb6a3b4b2016-09-12 05:58:29 +00009104+-------------------------------------------------------------------------------+
9105|:warning:`warning:` |nbsp| :diagtext:`control reaches end of non-void function`|
9106+-------------------------------------------------------------------------------+
9107
9108+-----------------------------------------------------------------------------+
9109|:warning:`warning:` |nbsp| :diagtext:`control reaches end of non-void lambda`|
9110+-----------------------------------------------------------------------------+
9111
Richard Smith66310362017-10-26 21:06:52 +00009112+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9113|:warning:`warning:` |nbsp| :diagtext:`control may reach end of coroutine; which is undefined behavior because the promise type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`does not declare 'return\_void()'`|
9114+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smithcf9f4222017-01-20 19:27:09 +00009115
Richard Smithb6a3b4b2016-09-12 05:58:29 +00009116+---------------------------------------------------------------------------------+
9117|:warning:`warning:` |nbsp| :diagtext:`control may reach end of non-void function`|
9118+---------------------------------------------------------------------------------+
9119
9120+-------------------------------------------------------------------------------+
9121|:warning:`warning:` |nbsp| :diagtext:`control may reach end of non-void lambda`|
9122+-------------------------------------------------------------------------------+
9123
9124+---------------------------------------------------+----------------------+-----------------------------------------------------------------+
9125|:error:`error:` |nbsp| :diagtext:`non-void` |nbsp| |+--------------------+| |nbsp| :placeholder:`A` |nbsp| :diagtext:`should return a value`|
9126| ||:diagtext:`function`|| |
9127| |+--------------------+| |
9128| ||:diagtext:`method` || |
9129| |+--------------------+| |
9130+---------------------------------------------------+----------------------+-----------------------------------------------------------------+
9131
9132
9133-Wreturn-type-c-linkage
9134-----------------------
9135This diagnostic is enabled by default.
9136
9137**Diagnostic text:**
9138
9139+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9140|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has C-linkage specified, but returns user-defined type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`which is incompatible with C`|
9141+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9142
9143+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9144|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has C-linkage specified, but returns incomplete type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`which could be incompatible with C`|
9145+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9146
9147
9148-Wrtti-for-exceptions
9149---------------------
9150This diagnostic is enabled by default.
9151
9152**Diagnostic text:**
9153
9154+--------------------------------------------------------------------------------------+
9155|:warning:`warning:` |nbsp| :diagtext:`implicitly enabling rtti for exception handling`|
9156+--------------------------------------------------------------------------------------+
9157
9158
9159-Rsanitize-address
9160------------------
9161**Diagnostic text:**
9162
9163+--------------------------------------------------------------------------------------------------------+
9164|:remark:`remark:` |nbsp| :diagtext:`-fsanitize-address-field-padding applied to` |nbsp| :placeholder:`A`|
9165+--------------------------------------------------------------------------------------------------------+
9166
9167+-----------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+
9168|:remark:`remark:` |nbsp| :diagtext:`-fsanitize-address-field-padding ignored for` |nbsp| :placeholder:`A` |nbsp| :diagtext:`because it` |nbsp| |+------------------------------------+|
9169| ||:diagtext:`is not C++` ||
9170| |+------------------------------------+|
9171| ||:diagtext:`is packed` ||
9172| |+------------------------------------+|
9173| ||:diagtext:`is a union` ||
9174| |+------------------------------------+|
9175| ||:diagtext:`is trivially copyable` ||
9176| |+------------------------------------+|
9177| ||:diagtext:`has trivial destructor` ||
9178| |+------------------------------------+|
9179| ||:diagtext:`is standard layout` ||
9180| |+------------------------------------+|
9181| ||:diagtext:`is in a blacklisted file`||
9182| |+------------------------------------+|
9183| ||:diagtext:`is blacklisted` ||
9184| |+------------------------------------+|
9185+-----------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+
9186
9187
9188-Wsection
9189---------
9190This diagnostic is enabled by default.
9191
9192**Diagnostic text:**
9193
Richard Smith66310362017-10-26 21:06:52 +00009194+--------------------------------------------------------------------------------------------+
9195|:warning:`warning:` |nbsp| :diagtext:`section attribute is specified on redeclared variable`|
9196+--------------------------------------------------------------------------------------------+
9197
Richard Smithb6a3b4b2016-09-12 05:58:29 +00009198+----------------------------------------------------------------------------------+
9199|:warning:`warning:` |nbsp| :diagtext:`section does not match previous declaration`|
9200+----------------------------------------------------------------------------------+
9201
9202
9203-Wselector
9204----------
9205Also controls `-Wselector-type-mismatch`_.
9206
9207**Diagnostic text:**
9208
9209+-------------------------------------------------------------------------------------------------------------------------------------------------+
9210|:warning:`warning:` |nbsp| :diagtext:`no method with selector` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is implemented in this translation unit`|
9211+-------------------------------------------------------------------------------------------------------------------------------------------------+
9212
9213
9214-Wselector-type-mismatch
9215------------------------
9216**Diagnostic text:**
9217
9218+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9219|:warning:`warning:` |nbsp| :diagtext:`several methods with selector` |nbsp| :placeholder:`A` |nbsp| :diagtext:`of mismatched types are found for the @selector expression`|
9220+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9221
9222
9223-Wself-assign
9224-------------
9225Some of the diagnostics controlled by this flag are enabled by default.
9226
9227Also controls `-Wself-assign-field`_.
9228
9229**Diagnostic text:**
9230
9231+------------------------------------------------------------------------------------------------------------------------------------------+
9232|:warning:`warning:` |nbsp| :diagtext:`explicitly assigning value of variable of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to itself`|
9233+------------------------------------------------------------------------------------------------------------------------------------------+
9234
9235
9236-Wself-assign-field
9237-------------------
9238This diagnostic is enabled by default.
9239
9240**Diagnostic text:**
9241
9242+--------------------------------------------------------+-------------------------------+-----------------------------+
9243|:warning:`warning:` |nbsp| :diagtext:`assigning` |nbsp| |+-----------------------------+| |nbsp| :diagtext:`to itself`|
9244| ||:diagtext:`field` || |
9245| |+-----------------------------+| |
9246| ||:diagtext:`instance variable`|| |
9247| |+-----------------------------+| |
9248+--------------------------------------------------------+-------------------------------+-----------------------------+
9249
9250
9251-Wself-move
9252-----------
9253**Diagnostic text:**
9254
9255+------------------------------------------------------------------------------------------------------------------------------+
9256|:warning:`warning:` |nbsp| :diagtext:`explicitly moving variable of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to itself`|
9257+------------------------------------------------------------------------------------------------------------------------------+
9258
9259
9260-Wsemicolon-before-method-body
9261------------------------------
9262**Diagnostic text:**
9263
9264+------------------------------------------------------------------------------+
9265|:warning:`warning:` |nbsp| :diagtext:`semicolon before method body is ignored`|
9266+------------------------------------------------------------------------------+
9267
9268
9269-Wsentinel
9270----------
9271This diagnostic is enabled by default.
9272
9273**Diagnostic text:**
9274
9275+------------------------------------------------------------------+-----------------------------+
9276|:warning:`warning:` |nbsp| :diagtext:`missing sentinel in` |nbsp| |+---------------------------+|
9277| ||:diagtext:`function call` ||
9278| |+---------------------------+|
9279| ||:diagtext:`method dispatch`||
9280| |+---------------------------+|
9281| ||:diagtext:`block call` ||
9282| |+---------------------------+|
9283+------------------------------------------------------------------+-----------------------------+
9284
9285+------------------------------------------------------------------------------------------------------------------------------------------------+
9286|:warning:`warning:` |nbsp| :diagtext:`not enough variable arguments in` |nbsp| :placeholder:`A` |nbsp| :diagtext:`declaration to fit a sentinel`|
9287+------------------------------------------------------------------------------------------------------------------------------------------------+
9288
9289
9290-Wsequence-point
9291----------------
9292Synonym for `-Wunsequenced`_.
9293
9294
9295-Wserialized-diagnostics
9296------------------------
9297This diagnostic is enabled by default.
9298
9299**Diagnostic text:**
9300
9301+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
9302|:warning:`warning:` |nbsp| :diagtext:`unable to open file` |nbsp| :placeholder:`A` |nbsp| :diagtext:`for serializing diagnostics (`:placeholder:`B`:diagtext:`)`|
9303+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
9304
9305+--------------------------------------------------------------------------------------------+
9306|:warning:`warning:` |nbsp| :diagtext:`unable to merge a subprocess's serialized diagnostics`|
9307+--------------------------------------------------------------------------------------------+
9308
9309
9310-Wshadow
9311--------
Richard Smithce9d5862016-09-14 01:51:10 +00009312Some of the diagnostics controlled by this flag are enabled by default.
9313
9314Also controls `-Wshadow-field-in-constructor-modified`_, `-Wshadow-ivar`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00009315
9316**Diagnostic text:**
9317
9318+--------------------------------------------------------------------+-------------------------------------------------------------+
9319|:warning:`warning:` |nbsp| :diagtext:`declaration shadows a` |nbsp| |+-----------------------------------------------------------+|
9320| ||:diagtext:`local variable` ||
9321| |+-----------------------------------------------------------+|
9322| ||+-----------------------------------------------+ ||
9323| |||:diagtext:`variable in` |nbsp| :placeholder:`C`| ||
9324| ||+-----------------------------------------------+ ||
9325| |+-----------------------------------------------------------+|
9326| ||+---------------------------------------------------------+||
9327| |||:diagtext:`static data member of` |nbsp| :placeholder:`C`|||
9328| ||+---------------------------------------------------------+||
9329| |+-----------------------------------------------------------+|
9330| ||+--------------------------------------------+ ||
9331| |||:diagtext:`field of` |nbsp| :placeholder:`C`| ||
9332| ||+--------------------------------------------+ ||
9333| |+-----------------------------------------------------------+|
Richard Smith9a016602017-04-13 22:44:22 +00009334| ||+----------------------------------------------+ ||
9335| |||:diagtext:`typedef in` |nbsp| :placeholder:`C`| ||
9336| ||+----------------------------------------------+ ||
9337| |+-----------------------------------------------------------+|
9338| ||+-------------------------------------------------+ ||
9339| |||:diagtext:`type alias in` |nbsp| :placeholder:`C`| ||
9340| ||+-------------------------------------------------+ ||
9341| |+-----------------------------------------------------------+|
Richard Smithb6a3b4b2016-09-12 05:58:29 +00009342+--------------------------------------------------------------------+-------------------------------------------------------------+
9343
9344
9345-Wshadow-all
9346------------
Richard Smithce9d5862016-09-14 01:51:10 +00009347Some of the diagnostics controlled by this flag are enabled by default.
9348
Richard Smith9a016602017-04-13 22:44:22 +00009349Controls `-Wshadow`_, `-Wshadow-field`_, `-Wshadow-field-in-constructor`_, `-Wshadow-uncaptured-local`_.
9350
9351
9352-Wshadow-field
9353--------------
9354**Diagnostic text:**
9355
9356+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9357|:warning:`warning:` |nbsp| :diagtext:`non-static data member '`:placeholder:`A`:diagtext:`' of '`:placeholder:`B`:diagtext:`' shadows member inherited from type '`:placeholder:`C`:diagtext:`'`|
9358+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +00009359
9360
9361-Wshadow-field-in-constructor
9362-----------------------------
9363Also controls `-Wshadow-field-in-constructor-modified`_.
9364
9365**Diagnostic text:**
9366
9367+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9368|:warning:`warning:` |nbsp| :diagtext:`constructor parameter` |nbsp| :placeholder:`A` |nbsp| :diagtext:`shadows the field` |nbsp| :placeholder:`B` |nbsp| :diagtext:`of` |nbsp| :placeholder:`C`|
9369+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9370
9371
9372-Wshadow-field-in-constructor-modified
9373--------------------------------------
9374**Diagnostic text:**
9375
9376+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
9377|:warning:`warning:` |nbsp| :diagtext:`modifying constructor parameter` |nbsp| :placeholder:`A` |nbsp| :diagtext:`that shadows a field of` |nbsp| :placeholder:`B`|
9378+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
9379
9380
9381-Wshadow-ivar
9382-------------
9383This diagnostic is enabled by default.
9384
9385**Diagnostic text:**
9386
9387+------------------------------------------------------------------------------------------------------------------------------+
9388|:warning:`warning:` |nbsp| :diagtext:`local declaration of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`hides instance variable`|
9389+------------------------------------------------------------------------------------------------------------------------------+
9390
9391
Richard Smithcf9f4222017-01-20 19:27:09 +00009392-Wshadow-uncaptured-local
9393-------------------------
9394**Diagnostic text:**
9395
9396+--------------------------------------------------------------------+-------------------------------------------------------------+
9397|:warning:`warning:` |nbsp| :diagtext:`declaration shadows a` |nbsp| |+-----------------------------------------------------------+|
9398| ||:diagtext:`local variable` ||
9399| |+-----------------------------------------------------------+|
9400| ||+-----------------------------------------------+ ||
9401| |||:diagtext:`variable in` |nbsp| :placeholder:`C`| ||
9402| ||+-----------------------------------------------+ ||
9403| |+-----------------------------------------------------------+|
9404| ||+---------------------------------------------------------+||
9405| |||:diagtext:`static data member of` |nbsp| :placeholder:`C`|||
9406| ||+---------------------------------------------------------+||
9407| |+-----------------------------------------------------------+|
9408| ||+--------------------------------------------+ ||
9409| |||:diagtext:`field of` |nbsp| :placeholder:`C`| ||
9410| ||+--------------------------------------------+ ||
9411| |+-----------------------------------------------------------+|
Richard Smith9a016602017-04-13 22:44:22 +00009412| ||+----------------------------------------------+ ||
9413| |||:diagtext:`typedef in` |nbsp| :placeholder:`C`| ||
9414| ||+----------------------------------------------+ ||
9415| |+-----------------------------------------------------------+|
9416| ||+-------------------------------------------------+ ||
9417| |||:diagtext:`type alias in` |nbsp| :placeholder:`C`| ||
9418| ||+-------------------------------------------------+ ||
9419| |+-----------------------------------------------------------+|
Richard Smithcf9f4222017-01-20 19:27:09 +00009420+--------------------------------------------------------------------+-------------------------------------------------------------+
9421
9422
Richard Smithb6a3b4b2016-09-12 05:58:29 +00009423-Wshift-count-negative
9424----------------------
9425This diagnostic is enabled by default.
9426
9427**Diagnostic text:**
9428
9429+--------------------------------------------------------------+
9430|:warning:`warning:` |nbsp| :diagtext:`shift count is negative`|
9431+--------------------------------------------------------------+
9432
9433
9434-Wshift-count-overflow
9435----------------------
9436This diagnostic is enabled by default.
9437
9438**Diagnostic text:**
9439
9440+-------------------------------------------------------------------+
9441|:warning:`warning:` |nbsp| :diagtext:`shift count >= width of type`|
9442+-------------------------------------------------------------------+
9443
9444
9445-Wshift-negative-value
9446----------------------
9447This diagnostic is enabled by default.
9448
9449**Diagnostic text:**
9450
9451+------------------------------------------------------------------------------------+
9452|:warning:`warning:` |nbsp| :diagtext:`shifting a negative signed value is undefined`|
9453+------------------------------------------------------------------------------------+
9454
9455
9456-Wshift-op-parentheses
9457----------------------
9458This diagnostic is enabled by default.
9459
9460**Diagnostic text:**
9461
9462+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9463|:warning:`warning:` |nbsp| :diagtext:`operator '`:placeholder:`A`:diagtext:`' has lower precedence than '`:placeholder:`B`:diagtext:`'; '`:placeholder:`B`:diagtext:`' will be evaluated first`|
9464+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9465
9466
9467-Wshift-overflow
9468----------------
9469This diagnostic is enabled by default.
9470
9471**Diagnostic text:**
9472
9473+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9474|:warning:`warning:` |nbsp| :diagtext:`signed shift result (`:placeholder:`A`:diagtext:`) requires` |nbsp| :placeholder:`B` |nbsp| :diagtext:`bits to represent, but` |nbsp| :placeholder:`C` |nbsp| :diagtext:`only has` |nbsp| :placeholder:`D` |nbsp| :diagtext:`bits`|
9475+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9476
9477
9478-Wshift-sign-overflow
9479---------------------
9480**Diagnostic text:**
9481
9482+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9483|:warning:`warning:` |nbsp| :diagtext:`signed shift result (`:placeholder:`A`:diagtext:`) sets the sign bit of the shift expression's type (`:placeholder:`B`:diagtext:`) and becomes negative`|
9484+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9485
9486
9487-Wshorten-64-to-32
9488------------------
9489**Diagnostic text:**
9490
9491+---------------------------------------------------------------------------------------------------------------------------------------------------------+
9492|:warning:`warning:` |nbsp| :diagtext:`implicit conversion loses integer precision:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
9493+---------------------------------------------------------------------------------------------------------------------------------------------------------+
9494
9495
9496-Wsign-compare
9497--------------
9498**Diagnostic text:**
9499
9500+--------------------------------------------------------------------------------------------------------------------------------------------------------+
9501|:warning:`warning:` |nbsp| :diagtext:`comparison of integers of different signs:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`and` |nbsp| :placeholder:`B`|
9502+--------------------------------------------------------------------------------------------------------------------------------------------------------+
9503
9504
9505-Wsign-conversion
9506-----------------
9507**Diagnostic text:**
9508
9509+----------------------------------------------------------------------------------------------------------------------------------------------------+
9510|:warning:`warning:` |nbsp| :diagtext:`implicit conversion changes signedness:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
9511+----------------------------------------------------------------------------------------------------------------------------------------------------+
9512
9513+---------------------------------------------------------------------------------------------------------------------------------------------+
9514|:warning:`warning:` |nbsp| :diagtext:`operand of ? changes signedness:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
9515+---------------------------------------------------------------------------------------------------------------------------------------------+
9516
9517
9518-Wsign-promo
9519------------
9520This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9521
Richard Smithcf9f4222017-01-20 19:27:09 +00009522-Wsigned-enum-bitfield
9523----------------------
9524**Diagnostic text:**
9525
9526+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9527|:warning:`warning:` |nbsp| :diagtext:`enums in the Microsoft ABI are signed integers by default; consider giving the enum` |nbsp| :placeholder:`A` |nbsp| :diagtext:`an unsigned underlying type to make this code portable`|
9528+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9529
9530
Richard Smithb6a3b4b2016-09-12 05:58:29 +00009531-Wsizeof-array-argument
9532-----------------------
9533This diagnostic is enabled by default.
9534
9535**Diagnostic text:**
9536
9537+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9538|:warning:`warning:` |nbsp| :diagtext:`sizeof on array function parameter will return size of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`instead of` |nbsp| :placeholder:`B`|
9539+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9540
9541
9542-Wsizeof-array-decay
9543--------------------
9544This diagnostic is enabled by default.
9545
9546**Diagnostic text:**
9547
9548+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9549|:warning:`warning:` |nbsp| :diagtext:`sizeof on pointer operation will return size of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`instead of` |nbsp| :placeholder:`B`|
9550+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9551
9552
9553-Wsizeof-pointer-memaccess
9554--------------------------
9555This diagnostic is enabled by default.
9556
9557**Diagnostic text:**
9558
9559+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9560|:warning:`warning:` |nbsp| :diagtext:`'`:placeholder:`A`:diagtext:`' call operates on objects of type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`while the size is based on a different type` |nbsp| :placeholder:`C`|
9561+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9562
9563+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+---------------------------------------------------------------------------------------+
9564|:warning:`warning:` |nbsp| :diagtext:`argument to 'sizeof' in` |nbsp| :placeholder:`A` |nbsp| :diagtext:`call is the same pointer type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`as the` |nbsp| |+-----------------------+|:diagtext:`; expected` |nbsp| :placeholder:`D` |nbsp| :diagtext:`or an explicit length`|
9565| ||:diagtext:`destination`|| |
9566| |+-----------------------+| |
9567| ||:diagtext:`source` || |
9568| |+-----------------------+| |
9569+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+---------------------------------------------------------------------------------------+
9570
9571
Richard Smith9a016602017-04-13 22:44:22 +00009572-Wslash-u-filename
9573------------------
9574This diagnostic is enabled by default.
9575
9576**Diagnostic text:**
9577
9578+--------------------------------------------------------------------------------------------------+
9579|:warning:`warning:` |nbsp| :diagtext:`'/U`:placeholder:`A`:diagtext:`' treated as the '/U' option`|
9580+--------------------------------------------------------------------------------------------------+
9581
9582
Richard Smithb6a3b4b2016-09-12 05:58:29 +00009583-Wsometimes-uninitialized
9584-------------------------
9585**Diagnostic text:**
9586
9587+-----------------------------------------------------------------------------------------------------+----------------------+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------+
9588|:warning:`warning:` |nbsp| :diagtext:`variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is` |nbsp| |+--------------------+| |nbsp| :diagtext:`uninitialized whenever` |nbsp| |+------------------------------------------------------------------------------------------------------------+|
9589| ||:diagtext:`used` || ||+---------------------------------------------------------------+-------------------+ ||
9590| |+--------------------+| |||:diagtext:`'`:placeholder:`D`:diagtext:`' condition is` |nbsp| |+-----------------+| ||
9591| ||:diagtext:`captured`|| ||| ||:diagtext:`true` || ||
9592| |+--------------------+| ||| |+-----------------+| ||
9593| | | ||| ||:diagtext:`false`|| ||
9594| | | ||| |+-----------------+| ||
9595| | | ||+---------------------------------------------------------------+-------------------+ ||
9596| | | |+------------------------------------------------------------------------------------------------------------+|
9597| | | ||+-------------------------------------------------------+--------------------------------------------------+||
9598| | | |||:diagtext:`'`:placeholder:`D`:diagtext:`' loop` |nbsp| |+------------------------------------------------+|||
9599| | | ||| ||:diagtext:`is entered` ||||
9600| | | ||| |+------------------------------------------------+|||
9601| | | ||| ||:diagtext:`exits because its condition is false`||||
9602| | | ||| |+------------------------------------------------+|||
9603| | | ||+-------------------------------------------------------+--------------------------------------------------+||
9604| | | |+------------------------------------------------------------------------------------------------------------+|
9605| | | ||+-------------------------------------------------------+--------------------------------------------------+||
9606| | | |||:diagtext:`'`:placeholder:`D`:diagtext:`' loop` |nbsp| |+------------------------------------------------+|||
9607| | | ||| ||:diagtext:`condition is true` ||||
9608| | | ||| |+------------------------------------------------+|||
9609| | | ||| ||:diagtext:`exits because its condition is false`||||
9610| | | ||| |+------------------------------------------------+|||
9611| | | ||+-------------------------------------------------------+--------------------------------------------------+||
9612| | | |+------------------------------------------------------------------------------------------------------------+|
9613| | | ||+----------------------------------------------------------------------+ ||
9614| | | |||:diagtext:`switch` |nbsp| :placeholder:`D` |nbsp| :diagtext:`is taken`| ||
9615| | | ||+----------------------------------------------------------------------+ ||
9616| | | |+------------------------------------------------------------------------------------------------------------+|
9617| | | ||:diagtext:`its declaration is reached` ||
9618| | | |+------------------------------------------------------------------------------------------------------------+|
9619| | | ||+---------------------------------------------+ ||
9620| | | |||:placeholder:`D` |nbsp| :diagtext:`is called`| ||
9621| | | ||+---------------------------------------------+ ||
9622| | | |+------------------------------------------------------------------------------------------------------------+|
9623+-----------------------------------------------------------------------------------------------------+----------------------+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------+
9624
9625
9626-Wsource-uses-openmp
9627--------------------
9628Some of the diagnostics controlled by this flag are enabled by default.
9629
9630**Diagnostic text:**
9631
9632+------------------------------------------------------------------------------------------------------------------------------+
9633|:warning:`warning:` |nbsp| :diagtext:`OpenMP only allows an ordered construct with the simd clause nested in a simd construct`|
9634+------------------------------------------------------------------------------------------------------------------------------+
9635
9636+------------------------------------------------------------------------------+
9637|:warning:`warning:` |nbsp| :diagtext:`unexpected '#pragma omp ...' in program`|
9638+------------------------------------------------------------------------------+
9639
9640
9641-Wspir-compat
9642-------------
9643**Diagnostic text:**
9644
9645+----------------------------------------------------------------------------------------------------------------------+
9646|:warning:`warning:` |nbsp| :diagtext:`sampler initializer has invalid` |nbsp| :placeholder:`A` |nbsp| :diagtext:`bits`|
9647+----------------------------------------------------------------------------------------------------------------------+
9648
9649
9650-Wstack-protector
9651-----------------
9652This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9653
9654-Wstatic-float-init
9655-------------------
9656This diagnostic is enabled by default.
9657
9658Also controls `-Wgnu-static-float-init`_.
9659
9660**Diagnostic text:**
9661
9662+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
9663|:error:`error:` |nbsp| :diagtext:`in-class initializer for static data member of type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`requires 'constexpr' specifier`|
9664+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
9665
9666
9667-Wstatic-in-inline
9668------------------
9669Some of the diagnostics controlled by this flag are enabled by default.
9670
9671**Diagnostic text:**
9672
9673+-----------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------+
9674|:warning:`warning:` |nbsp| :diagtext:`static` |nbsp| |+--------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`is used in an inline function with external linkage`|
9675| ||:diagtext:`function`|| |
9676| |+--------------------+| |
9677| ||:diagtext:`variable`|| |
9678| |+--------------------+| |
9679+-----------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------+
9680
9681+-----------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------+
9682|:warning:`warning:` |nbsp| :diagtext:`static` |nbsp| |+--------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`is used in an inline function with external linkage`|
9683| ||:diagtext:`function`|| |
9684| |+--------------------+| |
9685| ||:diagtext:`variable`|| |
9686| |+--------------------+| |
9687+-----------------------------------------------------+----------------------+-----------------------------------------------------------------------------------------------+
9688
9689
9690-Wstatic-inline-explicit-instantiation
9691--------------------------------------
9692This diagnostic is enabled by default.
9693
9694**Diagnostic text:**
9695
9696+-------------------------------------------------+--------------------+--------------------------------------------------------+
9697|:warning:`warning:` |nbsp| :diagtext:`ignoring '`|+------------------+|:diagtext:`' keyword on explicit template instantiation`|
9698| ||:diagtext:`static`|| |
9699| |+------------------+| |
9700| ||:diagtext:`inline`|| |
9701| |+------------------+| |
9702+-------------------------------------------------+--------------------+--------------------------------------------------------+
9703
9704
9705-Wstatic-local-in-inline
9706------------------------
9707This diagnostic is enabled by default.
9708
9709**Diagnostic text:**
9710
9711+--------------------------------------------------------------------------------------------------------------------------------+
9712|:warning:`warning:` |nbsp| :diagtext:`non-constant static local variable in inline function may be different in different files`|
9713+--------------------------------------------------------------------------------------------------------------------------------+
9714
9715
9716-Wstatic-self-init
9717------------------
9718This diagnostic is enabled by default.
9719
9720**Diagnostic text:**
9721
9722+----------------------------------------------------------------------------------------------------------------------------------------------------+
9723|:warning:`warning:` |nbsp| :diagtext:`static variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is suspiciously used within its own initialization`|
9724+----------------------------------------------------------------------------------------------------------------------------------------------------+
9725
9726
9727-Wstrict-aliasing
9728-----------------
9729This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9730
9731-Wstrict-aliasing=0
9732-------------------
9733This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9734
9735-Wstrict-aliasing=1
9736-------------------
9737This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9738
9739-Wstrict-aliasing=2
9740-------------------
9741This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9742
9743-Wstrict-overflow
9744-----------------
9745This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9746
9747-Wstrict-overflow=0
9748-------------------
9749This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9750
9751-Wstrict-overflow=1
9752-------------------
9753This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9754
9755-Wstrict-overflow=2
9756-------------------
9757This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9758
9759-Wstrict-overflow=3
9760-------------------
9761This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9762
9763-Wstrict-overflow=4
9764-------------------
9765This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9766
9767-Wstrict-overflow=5
9768-------------------
9769This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9770
9771-Wstrict-prototypes
9772-------------------
Richard Smithcf9f4222017-01-20 19:27:09 +00009773**Diagnostic text:**
9774
9775+---------------------------------------------------+--------------------------------------------------------------+-------------------------------+
9776|:warning:`warning:` |nbsp| :diagtext:`this` |nbsp| |+------------------------------------------------------------+| |nbsp| :diagtext:`a prototype`|
9777| ||:diagtext:`function declaration is not` || |
9778| |+------------------------------------------------------------+| |
Richard Smith66310362017-10-26 21:06:52 +00009779| ||:diagtext:`block declaration is not` || |
9780| |+------------------------------------------------------------+| |
Richard Smithcf9f4222017-01-20 19:27:09 +00009781| ||:diagtext:`old-style function definition is not preceded by`|| |
9782| |+------------------------------------------------------------+| |
9783+---------------------------------------------------+--------------------------------------------------------------+-------------------------------+
9784
9785
9786-Wstrict-prototypes
9787-------------------
9788**Diagnostic text:**
9789
9790+---------------------------------------------------+--------------------------------------------------------------+-------------------------------+
9791|:warning:`warning:` |nbsp| :diagtext:`this` |nbsp| |+------------------------------------------------------------+| |nbsp| :diagtext:`a prototype`|
9792| ||:diagtext:`function declaration is not` || |
9793| |+------------------------------------------------------------+| |
Richard Smith66310362017-10-26 21:06:52 +00009794| ||:diagtext:`block declaration is not` || |
9795| |+------------------------------------------------------------+| |
Richard Smithcf9f4222017-01-20 19:27:09 +00009796| ||:diagtext:`old-style function definition is not preceded by`|| |
9797| |+------------------------------------------------------------+| |
9798+---------------------------------------------------+--------------------------------------------------------------+-------------------------------+
9799
Richard Smithb6a3b4b2016-09-12 05:58:29 +00009800
9801-Wstrict-selector-match
9802-----------------------
9803**Diagnostic text:**
9804
9805+--------------------------------------------------------------------------------------------------------------+
9806|:warning:`warning:` |nbsp| :diagtext:`multiple methods named` |nbsp| :placeholder:`A` |nbsp| :diagtext:`found`|
9807+--------------------------------------------------------------------------------------------------------------+
9808
9809
9810-Wstring-compare
9811----------------
9812This diagnostic is enabled by default.
9813
9814**Diagnostic text:**
9815
9816+---------------------------------------------------------------------------+------------------------------+--------------------------------------------------------+
9817|:warning:`warning:` |nbsp| :diagtext:`result of comparison against` |nbsp| |+----------------------------+| |nbsp| :diagtext:`is unspecified (use strncmp instead)`|
9818| ||:diagtext:`a string literal`|| |
9819| |+----------------------------+| |
9820| ||:diagtext:`@encode` || |
9821| |+----------------------------+| |
9822+---------------------------------------------------------------------------+------------------------------+--------------------------------------------------------+
9823
9824
9825-Wstring-conversion
9826-------------------
9827**Diagnostic text:**
9828
9829+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
9830|:warning:`warning:` |nbsp| :diagtext:`implicit conversion turns string literal into bool:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`|
9831+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
9832
9833
9834-Wstring-plus-char
9835------------------
9836This diagnostic is enabled by default.
9837
9838**Diagnostic text:**
9839
9840+------------------------------------------------------------------------------------------------------------------------------------------+
9841|:warning:`warning:` |nbsp| :diagtext:`adding` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to a string pointer does not append to the string`|
9842+------------------------------------------------------------------------------------------------------------------------------------------+
9843
9844
9845-Wstring-plus-int
9846-----------------
9847This diagnostic is enabled by default.
9848
9849**Diagnostic text:**
9850
9851+----------------------------------------------------------------------------------------------------------------------------------+
9852|:warning:`warning:` |nbsp| :diagtext:`adding` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to a string does not append to the string`|
9853+----------------------------------------------------------------------------------------------------------------------------------+
9854
9855
9856-Wstrlcpy-strlcat-size
9857----------------------
9858This diagnostic is enabled by default.
9859
9860**Diagnostic text:**
9861
9862+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9863|:warning:`warning:` |nbsp| :diagtext:`size argument in` |nbsp| :placeholder:`A` |nbsp| :diagtext:`call appears to be size of the source; expected the size of the destination`|
9864+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9865
9866
9867-Wstrncat-size
9868--------------
9869This diagnostic is enabled by default.
9870
9871**Diagnostic text:**
9872
9873+--------------------------------------------------------------------------------------------------------------------------------+
9874|:warning:`warning:` |nbsp| :diagtext:`the value of the size argument in 'strncat' is too large, might lead to a buffer overflow`|
9875+--------------------------------------------------------------------------------------------------------------------------------+
9876
9877+-------------------------------------------------------------------------------------------------------+
9878|:warning:`warning:` |nbsp| :diagtext:`size argument in 'strncat' call appears to be size of the source`|
9879+-------------------------------------------------------------------------------------------------------+
9880
9881+-------------------------------------------------------------------------------------------+
9882|:warning:`warning:` |nbsp| :diagtext:`the value of the size argument to 'strncat' is wrong`|
9883+-------------------------------------------------------------------------------------------+
9884
9885
9886-Wsuper-class-method-mismatch
9887-----------------------------
9888**Diagnostic text:**
9889
9890+--------------------------------------------------------------------------------------------------------------------------------+
9891|:warning:`warning:` |nbsp| :diagtext:`method parameter type` |nbsp| :diagtext:`does not match super class method parameter type`|
9892+--------------------------------------------------------------------------------------------------------------------------------+
9893
9894
9895-Wswitch
9896--------
9897This diagnostic is enabled by default.
9898
9899**Diagnostic text:**
9900
9901+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9902|:warning:`warning:` |nbsp| :diagtext:`overflow converting case value to switch condition type (`:placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B`:diagtext:`)`|
9903+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9904
9905+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9906|:warning:`warning:` |nbsp| |+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+|
9907| ||+-----------------------------------------------------------------------------------------------+ ||
9908| |||:diagtext:`:enumeration value` |nbsp| :placeholder:`B` |nbsp| :diagtext:`not handled in switch`| ||
9909| ||+-----------------------------------------------------------------------------------------------+ ||
9910| |+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+|
9911| ||+-----------------------------------------------------------------------------------------------------------------------------------------------+ ||
9912| |||:diagtext:`:enumeration values` |nbsp| :placeholder:`B` |nbsp| :diagtext:`and` |nbsp| :placeholder:`C` |nbsp| :diagtext:`not handled in switch`| ||
9913| ||+-----------------------------------------------------------------------------------------------------------------------------------------------+ ||
9914| |+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+|
9915| ||+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ||
9916| |||:diagtext:`:enumeration values` |nbsp| :placeholder:`B`:diagtext:`,` |nbsp| :placeholder:`C`:diagtext:`, and` |nbsp| :placeholder:`D` |nbsp| :diagtext:`not handled in switch`| ||
9917| ||+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ||
9918| |+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+|
9919| ||+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+||
9920| |||:diagtext:`:`:placeholder:`A` |nbsp| :diagtext:`enumeration values not handled in switch:` |nbsp| :placeholder:`B`:diagtext:`,` |nbsp| :placeholder:`C`:diagtext:`,` |nbsp| :placeholder:`D`:diagtext:`...`|||
9921| ||+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+||
9922| |+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+|
9923+---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9924
9925+------------------------------------------------------------------------------------------------+
9926|:warning:`warning:` |nbsp| :diagtext:`case value not in enumerated type` |nbsp| :placeholder:`A`|
9927+------------------------------------------------------------------------------------------------+
9928
9929
9930-Wswitch-bool
9931-------------
9932This diagnostic is enabled by default.
9933
9934**Diagnostic text:**
9935
9936+-------------------------------------------------------------------------+
9937|:warning:`warning:` |nbsp| :diagtext:`switch condition has boolean value`|
9938+-------------------------------------------------------------------------+
9939
9940
9941-Wswitch-default
9942----------------
9943This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9944
9945-Wswitch-enum
9946-------------
9947**Diagnostic text:**
9948
9949+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9950|:warning:`warning:` |nbsp| |+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+|
9951| ||+----------------------------------------------------------------------------------------------------------+ ||
9952| |||:diagtext:`:enumeration value` |nbsp| :placeholder:`B` |nbsp| :diagtext:`not explicitly handled in switch`| ||
9953| ||+----------------------------------------------------------------------------------------------------------+ ||
9954| |+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+|
9955| ||+----------------------------------------------------------------------------------------------------------------------------------------------------------+ ||
9956| |||:diagtext:`:enumeration values` |nbsp| :placeholder:`B` |nbsp| :diagtext:`and` |nbsp| :placeholder:`C` |nbsp| :diagtext:`not explicitly handled in switch`| ||
9957| ||+----------------------------------------------------------------------------------------------------------------------------------------------------------+ ||
9958| |+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+|
9959| ||+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ||
9960| |||:diagtext:`:enumeration values` |nbsp| :placeholder:`B`:diagtext:`,` |nbsp| :placeholder:`C`:diagtext:`, and` |nbsp| :placeholder:`D` |nbsp| :diagtext:`not explicitly handled in switch`| ||
9961| ||+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ||
9962| |+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+|
9963| ||+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+||
9964| |||:diagtext:`:`:placeholder:`A` |nbsp| :diagtext:`enumeration values not explicitly handled in switch:` |nbsp| :placeholder:`B`:diagtext:`,` |nbsp| :placeholder:`C`:diagtext:`,` |nbsp| :placeholder:`D`:diagtext:`...`|||
9965| ||+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+||
9966| |+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+|
9967+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
9968
9969
9970-Wsync-fetch-and-nand-semantics-changed
9971---------------------------------------
9972This diagnostic is enabled by default.
9973
9974**Diagnostic text:**
9975
9976+-------------------------------------------------------------------------------------------------------------------------------------------+
9977|:warning:`warning:` |nbsp| :diagtext:`the semantics of this intrinsic changed with GCC version 4.4 - the newer semantics are provided here`|
9978+-------------------------------------------------------------------------------------------------------------------------------------------+
9979
9980
9981-Wsynth
9982-------
9983This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
9984
9985-Wtautological-compare
9986----------------------
9987Some of the diagnostics controlled by this flag are enabled by default.
9988
Richard Smith66310362017-10-26 21:06:52 +00009989Also controls `-Wtautological-constant-compare`_, `-Wtautological-overlap-compare`_, `-Wtautological-pointer-compare`_, `-Wtautological-undefined-compare`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +00009990
9991**Diagnostic text:**
9992
9993+---------------------------+---------------------------+--------------------------------------------------+------------------------+
9994|:warning:`warning:` |nbsp| |+-------------------------+|:diagtext:`comparison always evaluates to` |nbsp| |+----------------------+|
9995| ||:diagtext:`self-` || ||:diagtext:`false` ||
9996| |+-------------------------+| |+----------------------+|
9997| ||:diagtext:`array` |nbsp| || ||:diagtext:`true` ||
9998| |+-------------------------+| |+----------------------+|
9999| | | ||:diagtext:`a constant`||
10000| | | |+----------------------+|
10001+---------------------------+---------------------------+--------------------------------------------------+------------------------+
10002
10003+-------------------------------------------------------------------------------------+-------------------+
10004|:warning:`warning:` |nbsp| :diagtext:`bitwise comparison always evaluates to` |nbsp| |+-----------------+|
10005| ||:diagtext:`false`||
10006| |+-----------------+|
10007| ||:diagtext:`true` ||
10008| |+-----------------+|
10009+-------------------------------------------------------------------------------------+-------------------+
10010
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010011
Richard Smith66310362017-10-26 21:06:52 +000010012-Wtautological-constant-compare
10013-------------------------------
10014This diagnostic is enabled by default.
10015
10016Also controls `-Wtautological-constant-out-of-range-compare`_, `-Wtautological-unsigned-enum-zero-compare`_, `-Wtautological-unsigned-zero-compare`_.
10017
10018**Diagnostic text:**
10019
10020+---------------------------------------------------------+------------------+--------------------------------+------------------+-------------------------------------+-------------------+
10021|:warning:`warning:` |nbsp| :diagtext:`comparison` |nbsp| |+----------------+| |nbsp| :placeholder:`C` |nbsp| |+----------------+| |nbsp| :diagtext:`is always` |nbsp| |+-----------------+|
10022| ||:placeholder:`D`|| ||:placeholder:`B`|| ||:diagtext:`false`||
10023| |+----------------+| |+----------------+| |+-----------------+|
10024| ||:placeholder:`B`|| ||:placeholder:`D`|| ||:diagtext:`true` ||
10025| |+----------------+| |+----------------+| |+-----------------+|
10026+---------------------------------------------------------+------------------+--------------------------------+------------------+-------------------------------------+-------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010027
10028
10029-Wtautological-constant-out-of-range-compare
10030--------------------------------------------
10031This diagnostic is enabled by default.
10032
10033**Diagnostic text:**
10034
10035+------------------------------------------------------------+------------------------------------------------+--------------------------------+----------------------------------------------------------+-------------------------------------+-------------------+
10036|:warning:`warning:` |nbsp| :diagtext:`comparison of` |nbsp| |+----------------------------------------------+| |nbsp| :diagtext:`with` |nbsp| |+--------------------------------------------------------+| |nbsp| :diagtext:`is always` |nbsp| |+-----------------+|
10037| ||+--------------------------------------------+|| ||+------------------------------------------------------+|| ||:diagtext:`false`||
10038| |||:diagtext:`constant` |nbsp| :placeholder:`A`||| |||:diagtext:`expression of type` |nbsp| :placeholder:`C`||| |+-----------------+|
10039| ||+--------------------------------------------+|| ||+------------------------------------------------------+|| ||:diagtext:`true` ||
10040| |+----------------------------------------------+| |+--------------------------------------------------------+| |+-----------------+|
10041| ||:diagtext:`true` || ||:diagtext:`boolean expression` || | |
10042| |+----------------------------------------------+| |+--------------------------------------------------------+| | |
10043| ||:diagtext:`false` || | | | |
10044| |+----------------------------------------------+| | | | |
10045+------------------------------------------------------------+------------------------------------------------+--------------------------------+----------------------------------------------------------+-------------------------------------+-------------------+
10046
10047
10048-Wtautological-overlap-compare
10049------------------------------
10050**Diagnostic text:**
10051
10052+-----------------------------------------------------------------------------------------+-------------------+
10053|:warning:`warning:` |nbsp| :diagtext:`overlapping comparisons always evaluate to` |nbsp| |+-----------------+|
10054| ||:diagtext:`false`||
10055| |+-----------------+|
10056| ||:diagtext:`true` ||
10057| |+-----------------+|
10058+-----------------------------------------------------------------------------------------+-------------------+
10059
10060
10061-Wtautological-pointer-compare
10062------------------------------
10063This diagnostic is enabled by default.
10064
10065**Diagnostic text:**
10066
10067+--------------------------------------------------------------------+---------------------------+----------------------------------------------------------+-------------------------+----------------------------------------+-------------------+--------------------------------+
10068|:warning:`warning:` |nbsp| :diagtext:`comparison of nonnull` |nbsp| |+-------------------------+| |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`'` |nbsp| |+-----------------------+|:diagtext:`equal to a null pointer is '`|+-----------------+|:diagtext:`' on first encounter`|
10069| ||:diagtext:`function call`|| ||:diagtext:`not` |nbsp| || ||:diagtext:`true` || |
10070| |+-------------------------+| |+-----------------------+| |+-----------------+| |
10071| ||:diagtext:`parameter` || || || ||:diagtext:`false`|| |
10072| |+-------------------------+| |+-----------------------+| |+-----------------+| |
10073+--------------------------------------------------------------------+---------------------------+----------------------------------------------------------+-------------------------+----------------------------------------+-------------------+--------------------------------+
10074
10075+------------------------------------------------------------+------------------------+----------------------------------------------------------+-------------------------+-----------------------------------------------------+-------------------+
10076|:warning:`warning:` |nbsp| :diagtext:`comparison of` |nbsp| |+----------------------+| |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`'` |nbsp| |+-----------------------+|:diagtext:`equal to a null pointer is always` |nbsp| |+-----------------+|
10077| ||:diagtext:`address of`|| ||:diagtext:`not` |nbsp| || ||:diagtext:`true` ||
10078| |+----------------------+| |+-----------------------+| |+-----------------+|
10079| ||:diagtext:`function` || || || ||:diagtext:`false`||
10080| |+----------------------+| |+-----------------------+| |+-----------------+|
10081| ||:diagtext:`array` || | | | |
10082| |+----------------------+| | | | |
10083+------------------------------------------------------------+------------------------+----------------------------------------------------------+-------------------------+-----------------------------------------------------+-------------------+
10084
10085
10086-Wtautological-undefined-compare
10087--------------------------------
10088This diagnostic is enabled by default.
10089
10090**Diagnostic text:**
10091
10092+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+
10093|:warning:`warning:` |nbsp| :diagtext:`reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to` |nbsp| |+-----------------+|
10094| ||:diagtext:`true` ||
10095| |+-----------------+|
10096| ||:diagtext:`false`||
10097| |+-----------------+|
10098+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+
10099
10100+------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+
10101|:warning:`warning:` |nbsp| :diagtext:`'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to` |nbsp| |+-----------------+|
10102| ||:diagtext:`true` ||
10103| |+-----------------+|
10104| ||:diagtext:`false`||
10105| |+-----------------+|
10106+------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+
10107
10108
Richard Smith66310362017-10-26 21:06:52 +000010109-Wtautological-unsigned-enum-zero-compare
10110-----------------------------------------
10111This diagnostic is enabled by default.
10112
10113**Diagnostic text:**
10114
10115+------------------------------------------------------------+--------------------------------------+--------------------------------+--------------------------------------+-------------------------------------+-------------------+
10116|:warning:`warning:` |nbsp| :diagtext:`comparison of` |nbsp| |+------------------------------------+| |nbsp| :placeholder:`C` |nbsp| |+------------------------------------+| |nbsp| :diagtext:`is always` |nbsp| |+-----------------+|
10117| ||:placeholder:`D` || ||:diagtext:`unsigned enum expression`|| ||:diagtext:`false`||
10118| |+------------------------------------+| |+------------------------------------+| |+-----------------+|
10119| ||:diagtext:`unsigned enum expression`|| ||:placeholder:`D` || ||:diagtext:`true` ||
10120| |+------------------------------------+| |+------------------------------------+| |+-----------------+|
10121+------------------------------------------------------------+--------------------------------------+--------------------------------+--------------------------------------+-------------------------------------+-------------------+
10122
10123
10124-Wtautological-unsigned-zero-compare
10125------------------------------------
10126This diagnostic is enabled by default.
10127
10128**Diagnostic text:**
10129
10130+------------------------------------------------------------+---------------------------------+--------------------------------+---------------------------------+-------------------------------------+-------------------+
10131|:warning:`warning:` |nbsp| :diagtext:`comparison of` |nbsp| |+-------------------------------+| |nbsp| :placeholder:`C` |nbsp| |+-------------------------------+| |nbsp| :diagtext:`is always` |nbsp| |+-----------------+|
10132| ||:placeholder:`D` || ||:diagtext:`unsigned expression`|| ||:diagtext:`false`||
10133| |+-------------------------------+| |+-------------------------------+| |+-----------------+|
10134| ||:diagtext:`unsigned expression`|| ||:placeholder:`D` || ||:diagtext:`true` ||
10135| |+-------------------------------+| |+-------------------------------+| |+-----------------+|
10136+------------------------------------------------------------+---------------------------------+--------------------------------+---------------------------------+-------------------------------------+-------------------+
10137
10138
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010139-Wtentative-definition-incomplete-type
10140--------------------------------------
10141This diagnostic is enabled by default.
10142
10143**Diagnostic text:**
10144
10145+---------------------------------------------------------------------------------------------------------------------------------------------------+
10146|:warning:`warning:` |nbsp| :diagtext:`tentative definition of variable with internal linkage has incomplete non-array type` |nbsp| :placeholder:`A`|
10147+---------------------------------------------------------------------------------------------------------------------------------------------------+
10148
10149
10150-Wthread-safety
10151---------------
Richard Smith8cba2912016-09-14 01:55:42 +000010152Controls `-Wthread-safety-analysis`_, `-Wthread-safety-attributes`_, `-Wthread-safety-precise`_, `-Wthread-safety-reference`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010153
10154
10155-Wthread-safety-analysis
10156------------------------
10157**Diagnostic text:**
10158
10159+----------------------------------------------------------------------------------------------------------------------------------------------------+
10160|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' must be acquired before '`:placeholder:`C`:diagtext:`'`|
10161+----------------------------------------------------------------------------------------------------------------------------------------------------+
10162
10163+---------------------------------------------------------------------------------------------------------------------------------+
10164|:warning:`warning:` |nbsp| :diagtext:`Cycle in acquired\_before/after dependencies, starting with '`:placeholder:`A`:diagtext:`'`|
10165+---------------------------------------------------------------------------------------------------------------------------------+
10166
10167+---------------------------------------------------------------------+
10168|:warning:`warning:` |nbsp| :diagtext:`cannot resolve lock expression`|
10169+---------------------------------------------------------------------+
10170
10171+-----------------------------------------------------------------------------------------------------------------------------------------------+
10172|:warning:`warning:` |nbsp| :diagtext:`acquiring` |nbsp| :placeholder:`A` |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' that is already held`|
10173+-----------------------------------------------------------------------------------------------------------------------------------------------+
10174
10175+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
10176|:warning:`warning:` |nbsp| :diagtext:`expecting` |nbsp| :placeholder:`A` |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' to be held at start of each loop`|
10177+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
10178
10179+------------------------------------------------------------------------------------------------------------------------------------------------------------+
10180|:warning:`warning:` |nbsp| :diagtext:`expecting` |nbsp| :placeholder:`A` |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' to be held at the end of function`|
10181+------------------------------------------------------------------------------------------------------------------------------------------------------------+
10182
10183+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10184|:warning:`warning:` |nbsp| :diagtext:`cannot call function '`:placeholder:`B`:diagtext:`' while` |nbsp| :placeholder:`A` |nbsp| :diagtext:`'`:placeholder:`C`:diagtext:`' is held`|
10185+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10186
10187+---------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10188|:warning:`warning:` |nbsp| :diagtext:`calling function '`:placeholder:`B`:diagtext:`' requires holding` |nbsp| :placeholder:`A` |nbsp| |+--------------------------------------------------------+|
10189| ||+------------------------------------------+ ||
10190| |||:diagtext:`'`:placeholder:`C`:diagtext:`'`| ||
10191| ||+------------------------------------------+ ||
10192| |+--------------------------------------------------------+|
10193| ||+------------------------------------------------------+||
10194| |||:diagtext:`'`:placeholder:`C`:diagtext:`' exclusively`|||
10195| ||+------------------------------------------------------+||
10196| |+--------------------------------------------------------+|
10197+---------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10198
10199+--------------------------------------------------------------------------------------------------------------------------------------------------+
10200|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' is acquired exclusively and shared in the same scope`|
10201+--------------------------------------------------------------------------------------------------------------------------------------------------+
10202
10203+------------------------------------------------------------------------------------------------------------------------------------+
10204|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' is not held on every path through here`|
10205+------------------------------------------------------------------------------------------------------------------------------------+
10206
10207+----------------------------------------------------------------------------------------------------------------------------------+
10208|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' is still held at the end of function`|
10209+----------------------------------------------------------------------------------------------------------------------------------+
10210
10211+--------------------------------------------------------------------------------------------------------------------------------------------+
10212|:warning:`warning:` |nbsp| :diagtext:`releasing` |nbsp| :placeholder:`A` |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' that was not held`|
10213+--------------------------------------------------------------------------------------------------------------------------------------------+
10214
10215+----------------------------------------------------------------------------------------------------------------------------------------+-----------------------+--------------------------------------------+-----------------------+--------------------------+
10216|:warning:`warning:` |nbsp| :diagtext:`releasing` |nbsp| :placeholder:`A` |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' using` |nbsp| |+---------------------+| |nbsp| :diagtext:`access, expected` |nbsp| |+---------------------+| |nbsp| :diagtext:`access`|
10217| ||:diagtext:`shared` || ||:diagtext:`shared` || |
10218| |+---------------------+| |+---------------------+| |
10219| ||:diagtext:`exclusive`|| ||:diagtext:`exclusive`|| |
10220| |+---------------------+| |+---------------------+| |
10221+----------------------------------------------------------------------------------------------------------------------------------------+-----------------------+--------------------------------------------+-----------------------+--------------------------+
10222
10223+---------------------------+---------------------+---------------------------------------------------------------------------------------------------+-----------------------------------+
10224|:warning:`warning:` |nbsp| |+-------------------+| |nbsp| :diagtext:`the value pointed to by '`:placeholder:`A`:diagtext:`' requires holding` |nbsp| |+---------------------------------+|
10225| ||:diagtext:`reading`|| ||:diagtext:`any mutex` ||
10226| |+-------------------+| |+---------------------------------+|
10227| ||:diagtext:`writing`|| ||:diagtext:`any mutex exclusively`||
10228| |+-------------------+| |+---------------------------------+|
10229+---------------------------+---------------------+---------------------------------------------------------------------------------------------------+-----------------------------------+
10230
10231+---------------------------+---------------------+---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10232|:warning:`warning:` |nbsp| |+-------------------+| |nbsp| :diagtext:`the value pointed to by '`:placeholder:`B`:diagtext:`' requires holding` |nbsp| :placeholder:`A` |nbsp| |+--------------------------------------------------------+|
10233| ||:diagtext:`reading`|| ||+------------------------------------------+ ||
10234| |+-------------------+| |||:diagtext:`'`:placeholder:`C`:diagtext:`'`| ||
10235| ||:diagtext:`writing`|| ||+------------------------------------------+ ||
10236| |+-------------------+| |+--------------------------------------------------------+|
10237| | | ||+------------------------------------------------------+||
10238| | | |||:diagtext:`'`:placeholder:`C`:diagtext:`' exclusively`|||
10239| | | ||+------------------------------------------------------+||
10240| | | |+--------------------------------------------------------+|
10241+---------------------------+---------------------+---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10242
10243+---------------------------+---------------------+------------------------------------------------------------------------------------+-----------------------------------+
10244|:warning:`warning:` |nbsp| |+-------------------+| |nbsp| :diagtext:`variable '`:placeholder:`A`:diagtext:`' requires holding` |nbsp| |+---------------------------------+|
10245| ||:diagtext:`reading`|| ||:diagtext:`any mutex` ||
10246| |+-------------------+| |+---------------------------------+|
10247| ||:diagtext:`writing`|| ||:diagtext:`any mutex exclusively`||
10248| |+-------------------+| |+---------------------------------+|
10249+---------------------------+---------------------+------------------------------------------------------------------------------------+-----------------------------------+
10250
10251+---------------------------+---------------------+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10252|:warning:`warning:` |nbsp| |+-------------------+| |nbsp| :diagtext:`variable '`:placeholder:`B`:diagtext:`' requires holding` |nbsp| :placeholder:`A` |nbsp| |+--------------------------------------------------------+|
10253| ||:diagtext:`reading`|| ||+------------------------------------------+ ||
10254| |+-------------------+| |||:diagtext:`'`:placeholder:`C`:diagtext:`'`| ||
10255| ||:diagtext:`writing`|| ||+------------------------------------------+ ||
10256| |+-------------------+| |+--------------------------------------------------------+|
10257| | | ||+------------------------------------------------------+||
10258| | | |||:diagtext:`'`:placeholder:`C`:diagtext:`' exclusively`|||
10259| | | ||+------------------------------------------------------+||
10260| | | |+--------------------------------------------------------+|
10261+---------------------------+---------------------+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10262
10263
10264-Wthread-safety-attributes
10265--------------------------
10266**Diagnostic text:**
10267
10268+----------------------------------------------------------------------------------------------------------------------------------------+
10269|:warning:`warning:` |nbsp| :diagtext:`invalid capability name '`:placeholder:`A`:diagtext:`'; capability name must be 'mutex' or 'role'`|
10270+----------------------------------------------------------------------------------------------------------------------------------------+
10271
10272+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10273|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute requires arguments whose type is annotated with 'capability' attribute; type here is` |nbsp| :placeholder:`B`|
10274+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10275
10276+--------------------------------------------------------------------------------------------------------------------------------------------------------+
10277|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute can only be applied in a context annotated with 'capability("mutex")' attribute`|
10278+--------------------------------------------------------------------------------------------------------------------------------------------------------+
10279
10280+----------------------------------------------------------------------------------------------------------------------------------+
10281|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`only applies to pointer types; type here is` |nbsp| :placeholder:`B`|
10282+----------------------------------------------------------------------------------------------------------------------------------+
10283
10284+------------------------------------------------------------------------------------------------------------------------------------+
10285|:warning:`warning:` |nbsp| :diagtext:`ignoring` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute because its argument is invalid`|
10286+------------------------------------------------------------------------------------------------------------------------------------+
10287
10288
10289-Wthread-safety-beta
10290--------------------
10291**Diagnostic text:**
10292
10293+------------------------------------------------------------------+
10294|:warning:`warning:` |nbsp| :diagtext:`Thread safety beta warning.`|
10295+------------------------------------------------------------------+
10296
10297
10298-Wthread-safety-negative
10299------------------------
10300**Diagnostic text:**
10301
10302+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10303|:warning:`warning:` |nbsp| :diagtext:`acquiring` |nbsp| :placeholder:`A` |nbsp| :diagtext:`'`:placeholder:`B`:diagtext:`' requires negative capability '`:placeholder:`C`:diagtext:`'`|
10304+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10305
10306
10307-Wthread-safety-precise
10308-----------------------
10309**Diagnostic text:**
10310
10311+---------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10312|:warning:`warning:` |nbsp| :diagtext:`calling function '`:placeholder:`B`:diagtext:`' requires holding` |nbsp| :placeholder:`A` |nbsp| |+--------------------------------------------------------+|
10313| ||+------------------------------------------+ ||
10314| |||:diagtext:`'`:placeholder:`C`:diagtext:`'`| ||
10315| ||+------------------------------------------+ ||
10316| |+--------------------------------------------------------+|
10317| ||+------------------------------------------------------+||
10318| |||:diagtext:`'`:placeholder:`C`:diagtext:`' exclusively`|||
10319| ||+------------------------------------------------------+||
10320| |+--------------------------------------------------------+|
10321+---------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10322
10323+---------------------------+---------------------+---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10324|:warning:`warning:` |nbsp| |+-------------------+| |nbsp| :diagtext:`the value pointed to by '`:placeholder:`B`:diagtext:`' requires holding` |nbsp| :placeholder:`A` |nbsp| |+--------------------------------------------------------+|
10325| ||:diagtext:`reading`|| ||+------------------------------------------+ ||
10326| |+-------------------+| |||:diagtext:`'`:placeholder:`C`:diagtext:`'`| ||
10327| ||:diagtext:`writing`|| ||+------------------------------------------+ ||
10328| |+-------------------+| |+--------------------------------------------------------+|
10329| | | ||+------------------------------------------------------+||
10330| | | |||:diagtext:`'`:placeholder:`C`:diagtext:`' exclusively`|||
10331| | | ||+------------------------------------------------------+||
10332| | | |+--------------------------------------------------------+|
10333+---------------------------+---------------------+---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10334
10335+---------------------------+---------------------+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10336|:warning:`warning:` |nbsp| |+-------------------+| |nbsp| :diagtext:`variable '`:placeholder:`B`:diagtext:`' requires holding` |nbsp| :placeholder:`A` |nbsp| |+--------------------------------------------------------+|
10337| ||:diagtext:`reading`|| ||+------------------------------------------+ ||
10338| |+-------------------+| |||:diagtext:`'`:placeholder:`C`:diagtext:`'`| ||
10339| ||:diagtext:`writing`|| ||+------------------------------------------+ ||
10340| |+-------------------+| |+--------------------------------------------------------+|
10341| | | ||+------------------------------------------------------+||
10342| | | |||:diagtext:`'`:placeholder:`C`:diagtext:`' exclusively`|||
10343| | | ||+------------------------------------------------------+||
10344| | | |+--------------------------------------------------------+|
10345+---------------------------+---------------------+------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10346
10347
10348-Wthread-safety-reference
10349-------------------------
10350**Diagnostic text:**
10351
10352+----------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10353|:warning:`warning:` |nbsp| :diagtext:`passing variable '`:placeholder:`B`:diagtext:`' by reference requires holding` |nbsp| :placeholder:`A` |nbsp| |+--------------------------------------------------------+|
10354| ||+------------------------------------------+ ||
10355| |||:diagtext:`'`:placeholder:`C`:diagtext:`'`| ||
10356| ||+------------------------------------------+ ||
10357| |+--------------------------------------------------------+|
10358| ||+------------------------------------------------------+||
10359| |||:diagtext:`'`:placeholder:`C`:diagtext:`' exclusively`|||
10360| ||+------------------------------------------------------+||
10361| |+--------------------------------------------------------+|
10362+----------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10363
10364+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10365|:warning:`warning:` |nbsp| :diagtext:`passing the value that '`:placeholder:`B`:diagtext:`' points to by reference requires holding` |nbsp| :placeholder:`A` |nbsp| |+--------------------------------------------------------+|
10366| ||+------------------------------------------+ ||
10367| |||:diagtext:`'`:placeholder:`C`:diagtext:`'`| ||
10368| ||+------------------------------------------+ ||
10369| |+--------------------------------------------------------+|
10370| ||+------------------------------------------------------+||
10371| |||:diagtext:`'`:placeholder:`C`:diagtext:`' exclusively`|||
10372| ||+------------------------------------------------------+||
10373| |+--------------------------------------------------------+|
10374+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------+
10375
10376
10377-Wthread-safety-verbose
10378-----------------------
10379**Diagnostic text:**
10380
10381+---------------------------------------------------------------------+
10382|:warning:`warning:` |nbsp| :diagtext:`Thread safety verbose warning.`|
10383+---------------------------------------------------------------------+
10384
10385
10386-Wtrigraphs
10387-----------
10388This diagnostic is enabled by default.
10389
10390**Diagnostic text:**
10391
10392+-----------------------------------------------------------------------------------------------------+
10393|:warning:`warning:` |nbsp| :diagtext:`trigraph converted to '`:placeholder:`A`:diagtext:`' character`|
10394+-----------------------------------------------------------------------------------------------------+
10395
10396+------------------------------------------------------------------+
10397|:warning:`warning:` |nbsp| :diagtext:`trigraph ends block comment`|
10398+------------------------------------------------------------------+
10399
10400+-------------------------------------------------------+
10401|:warning:`warning:` |nbsp| :diagtext:`trigraph ignored`|
10402+-------------------------------------------------------+
10403
10404+-------------------------------------------------------------------------------+
10405|:warning:`warning:` |nbsp| :diagtext:`ignored trigraph would end block comment`|
10406+-------------------------------------------------------------------------------+
10407
10408
10409-Wtype-limits
10410-------------
10411This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
10412
10413-Wtype-safety
10414-------------
10415This diagnostic is enabled by default.
10416
10417**Diagnostic text:**
10418
10419+----------------------------------------------------------------------------------------------------------------------------+
10420|:warning:`warning:` |nbsp| :diagtext:`specified` |nbsp| :placeholder:`A` |nbsp| :diagtext:`type tag requires a null pointer`|
10421+----------------------------------------------------------------------------------------------------------------------------+
10422
10423+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+
10424|:warning:`warning:` |nbsp| :diagtext:`argument type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`doesn't match specified` |nbsp| :placeholder:`B` |nbsp| :diagtext:`type tag` |nbsp| |+---------------------------------------------------+|
10425| ||+-------------------------------------------------+||
10426| |||:diagtext:`that requires` |nbsp| :placeholder:`D`|||
10427| ||+-------------------------------------------------+||
10428| |+---------------------------------------------------+|
10429| || ||
10430| |+---------------------------------------------------+|
10431+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+
10432
10433+---------------------------------------------------------------------------------------------------+
10434|:warning:`warning:` |nbsp| :diagtext:`this type tag was not designed to be used with this function`|
10435+---------------------------------------------------------------------------------------------------+
10436
10437
10438-Wtypedef-redefinition
10439----------------------
10440This diagnostic is enabled by default.
10441
10442**Diagnostic text:**
10443
10444+--------------------------------------------------------------------------------------------------------------------------+
10445|:warning:`warning:` |nbsp| :diagtext:`redefinition of typedef` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is a C11 feature`|
10446+--------------------------------------------------------------------------------------------------------------------------+
10447
10448
10449-Wtypename-missing
10450------------------
10451This diagnostic is enabled by default.
10452
10453**Diagnostic text:**
10454
10455+-------------------------------------------------------------------------------------------------------------------------------------+
10456|:warning:`warning:` |nbsp| :diagtext:`missing 'typename' prior to dependent type name '`:placeholder:`A`:placeholder:`B`:diagtext:`'`|
10457+-------------------------------------------------------------------------------------------------------------------------------------+
10458
10459
Richard Smithcf9f4222017-01-20 19:27:09 +000010460-Wunable-to-open-stats-file
10461---------------------------
10462This diagnostic is enabled by default.
10463
10464**Diagnostic text:**
10465
10466+-------------------------------------------------------------------------------------------------------------------------------------------+
10467|:warning:`warning:` |nbsp| :diagtext:`unable to open statistics output file '`:placeholder:`A`:diagtext:`': '`:placeholder:`B`:diagtext:`'`|
10468+-------------------------------------------------------------------------------------------------------------------------------------------+
10469
10470
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010471-Wunavailable-declarations
10472--------------------------
10473This diagnostic is enabled by default.
10474
10475**Diagnostic text:**
10476
10477+----------------------------------------------------------------------------------------------------------------------+
10478|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`may be unavailable because the receiver type is unknown`|
10479+----------------------------------------------------------------------------------------------------------------------+
10480
10481
10482-Wundeclared-selector
10483---------------------
10484**Diagnostic text:**
10485
10486+----------------------------------------------------------------------------------+
10487|:warning:`warning:` |nbsp| :diagtext:`undeclared selector` |nbsp| :placeholder:`A`|
10488+----------------------------------------------------------------------------------+
10489
10490+-------------------------------------------------------------------------------------------------------------------------------------------------+
10491|:warning:`warning:` |nbsp| :diagtext:`undeclared selector` |nbsp| :placeholder:`A`:diagtext:`; did you mean` |nbsp| :placeholder:`B`:diagtext:`?`|
10492+-------------------------------------------------------------------------------------------------------------------------------------------------+
10493
10494
10495-Wundef
10496-------
10497**Diagnostic text:**
10498
10499+---------------------------------------------------------------------------------------------+
10500|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not defined, evaluates to 0`|
10501+---------------------------------------------------------------------------------------------+
10502
10503
10504-Wundefined-bool-conversion
10505---------------------------
10506This diagnostic is enabled by default.
10507
10508**Diagnostic text:**
10509
10510+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10511|:warning:`warning:` |nbsp| :diagtext:`reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true`|
10512+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10513
10514+-----------------------------------------------------------------------------------------------------------------------------------------------+
10515|:warning:`warning:` |nbsp| :diagtext:`'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true`|
10516+-----------------------------------------------------------------------------------------------------------------------------------------------+
10517
10518
10519-Wundefined-func-template
10520-------------------------
10521**Diagnostic text:**
10522
10523+---------------------------------------------------------------------------------------------------------------------------------------------------------+
10524|:warning:`warning:` |nbsp| :diagtext:`instantiation of function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`required here, but no definition is available`|
10525+---------------------------------------------------------------------------------------------------------------------------------------------------------+
10526
10527
10528-Wundefined-inline
10529------------------
10530This diagnostic is enabled by default.
10531
10532**Diagnostic text:**
10533
10534+----------------------------------------------------------------------------------------------------------------+
10535|:warning:`warning:` |nbsp| :diagtext:`inline function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not defined`|
10536+----------------------------------------------------------------------------------------------------------------+
10537
10538
10539-Wundefined-internal
10540--------------------
10541This diagnostic is enabled by default.
10542
10543**Diagnostic text:**
10544
10545+---------------------------+----------------------+-----------------------------------------------------------------------------------+
10546|:warning:`warning:` |nbsp| |+--------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`has internal linkage but is not defined`|
10547| ||:diagtext:`function`|| |
10548| |+--------------------+| |
10549| ||:diagtext:`variable`|| |
10550| |+--------------------+| |
10551+---------------------------+----------------------+-----------------------------------------------------------------------------------+
10552
10553
Richard Smith66310362017-10-26 21:06:52 +000010554-Wundefined-internal-type
10555-------------------------
10556**Diagnostic text:**
10557
10558+---------------------------------------------------------------------------------------------------------+----------------------+----------------------------------------------------------------------------------+
10559|:warning:`warning:` |nbsp| :diagtext:`ISO C++ requires a definition in this translation unit for` |nbsp| |+--------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`because its type does not have linkage`|
10560| ||:diagtext:`function`|| |
10561| |+--------------------+| |
10562| ||:diagtext:`variable`|| |
10563| |+--------------------+| |
10564+---------------------------------------------------------------------------------------------------------+----------------------+----------------------------------------------------------------------------------+
10565
10566
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010567-Wundefined-reinterpret-cast
10568----------------------------
10569**Diagnostic text:**
10570
10571+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10572|:warning:`warning:` |nbsp| :diagtext:`dereference of type` |nbsp| :placeholder:`B` |nbsp| :diagtext:`that was reinterpret\_cast from type` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has undefined behavior`|
10573+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10574
10575+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10576|:warning:`warning:` |nbsp| :diagtext:`reinterpret\_cast from` |nbsp| :placeholder:`A` |nbsp| :diagtext:`to` |nbsp| :placeholder:`B` |nbsp| :diagtext:`has undefined behavior`|
10577+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10578
10579
10580-Wundefined-var-template
10581------------------------
10582This diagnostic is enabled by default.
10583
10584**Diagnostic text:**
10585
10586+---------------------------------------------------------------------------------------------------------------------------------------------------------+
10587|:warning:`warning:` |nbsp| :diagtext:`instantiation of variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`required here, but no definition is available`|
10588+---------------------------------------------------------------------------------------------------------------------------------------------------------+
10589
10590
10591-Wunevaluated-expression
10592------------------------
10593This diagnostic is enabled by default.
10594
10595Also controls `-Wpotentially-evaluated-expression`_.
10596
10597**Diagnostic text:**
10598
10599+-----------------------------------------------------------------------------------------------------------+
10600|:warning:`warning:` |nbsp| :diagtext:`expression with side effects has no effect in an unevaluated context`|
10601+-----------------------------------------------------------------------------------------------------------+
10602
10603
10604-Wunguarded-availability
10605------------------------
Richard Smith66310362017-10-26 21:06:52 +000010606Some of the diagnostics controlled by this flag are enabled by default.
10607
10608Also controls `-Wunguarded-availability-new`_.
10609
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010610**Diagnostic text:**
10611
Richard Smith66310362017-10-26 21:06:52 +000010612+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
10613|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is only available on` |nbsp| :placeholder:`B` |nbsp| :placeholder:`C` |nbsp| :diagtext:`or newer`|
10614+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010615
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010616
Richard Smith66310362017-10-26 21:06:52 +000010617-Wunguarded-availability-new
10618----------------------------
10619This diagnostic is enabled by default.
10620
10621**Diagnostic text:**
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010622
10623+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
10624|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is only available on` |nbsp| :placeholder:`B` |nbsp| :placeholder:`C` |nbsp| :diagtext:`or newer`|
10625+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
10626
10627
10628-Wunicode
10629---------
10630This diagnostic is enabled by default.
10631
10632**Diagnostic text:**
10633
10634+-------------------------------------------------------------------------------------------------------------------+
10635|:warning:`warning:` |nbsp| :diagtext:`incomplete universal character name; treating as '\\' followed by identifier`|
10636+-------------------------------------------------------------------------------------------------------------------+
10637
10638+-------------------------------------------------------------------------------------------------------------------------------------------------------+
10639|:warning:`warning:` |nbsp| :diagtext:`\\`:placeholder:`A` |nbsp| :diagtext:`used with no following hex digits; treating as '\\' followed by identifier`|
10640+-------------------------------------------------------------------------------------------------------------------------------------------------------+
10641
10642+-----------------------------------------------------------------------------------------------+
10643|:warning:`warning:` |nbsp| :diagtext:`universal character name refers to a surrogate character`|
10644+-----------------------------------------------------------------------------------------------+
10645
10646+--------------------------------------------------------------------------------------------------------------------------------------+
10647|:warning:`warning:` |nbsp| :diagtext:`universal character names are only valid in C99 or C++; treating as '\\' followed by identifier`|
10648+--------------------------------------------------------------------------------------------------------------------------------------+
10649
10650+---------------------------------------------------------------------------------------------+
10651|:warning:`warning:` |nbsp| :diagtext:`universal character names are only valid in C99 or C++`|
10652+---------------------------------------------------------------------------------------------+
10653
10654
10655-Wunicode-whitespace
10656--------------------
10657This diagnostic is enabled by default.
10658
10659**Diagnostic text:**
10660
10661+-------------------------------------------------------------------------------+
10662|:warning:`warning:` |nbsp| :diagtext:`treating Unicode character as whitespace`|
10663+-------------------------------------------------------------------------------+
10664
10665
10666-Wuninitialized
10667---------------
10668Some of the diagnostics controlled by this flag are enabled by default.
10669
10670Also controls `-Wsometimes-uninitialized`_, `-Wstatic-self-init`_.
10671
10672**Diagnostic text:**
10673
10674+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
10675|:warning:`warning:` |nbsp| :diagtext:`base class` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is uninitialized when used here to access` |nbsp| :placeholder:`B`|
10676+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
10677
10678+-----------------------------------------------------------------------------------------------------------------------+
10679|:warning:`warning:` |nbsp| :diagtext:`field` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is uninitialized when used here`|
10680+-----------------------------------------------------------------------------------------------------------------------+
10681
10682+--------------------------------------------------------------------------------------------------------------------------------------+
10683|:warning:`warning:` |nbsp| :diagtext:`reference` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not yet bound to a value when used here`|
10684+--------------------------------------------------------------------------------------------------------------------------------------+
10685
10686+------------------------------------------------------------------------------------------------------------------------------------------------+
10687|:warning:`warning:` |nbsp| :diagtext:`block pointer variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is uninitialized when captured by block`|
10688+------------------------------------------------------------------------------------------------------------------------------------------------+
10689
10690+---------------------------------------------------------------------------------------------------------------------------------------------------+
10691|:warning:`warning:` |nbsp| :diagtext:`variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is uninitialized when used within its own initialization`|
10692+---------------------------------------------------------------------------------------------------------------------------------------------------+
10693
10694+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
10695|:warning:`warning:` |nbsp| :diagtext:`reference` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not yet bound to a value when used within its own initialization`|
10696+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
10697
10698+------------------------------------------------------------------------------------------------------------------------+-------------------------------+
10699|:warning:`warning:` |nbsp| :diagtext:`variable` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is uninitialized when` |nbsp| |+-----------------------------+|
10700| ||:diagtext:`used here` ||
10701| |+-----------------------------+|
10702| ||:diagtext:`captured by block`||
10703| |+-----------------------------+|
10704+------------------------------------------------------------------------------------------------------------------------+-------------------------------+
10705
10706
10707-Wunknown-argument
10708------------------
10709This diagnostic is enabled by default.
10710
10711**Diagnostic text:**
10712
10713+-----------------------------------------------------------------------------------------------------------+
10714|:warning:`warning:` |nbsp| :diagtext:`unknown argument ignored in clang-cl: '`:placeholder:`A`:diagtext:`'`|
10715+-----------------------------------------------------------------------------------------------------------+
10716
10717
10718-Wunknown-attributes
10719--------------------
10720This diagnostic is enabled by default.
10721
10722**Diagnostic text:**
10723
10724+-----------------------------------------------------------------------------------------------------------+
10725|:warning:`warning:` |nbsp| :diagtext:`unknown attribute` |nbsp| :placeholder:`A` |nbsp| :diagtext:`ignored`|
10726+-----------------------------------------------------------------------------------------------------------+
10727
10728
10729-Wunknown-escape-sequence
10730-------------------------
10731This diagnostic is enabled by default.
10732
10733**Diagnostic text:**
10734
10735+-----------------------------------------------------------------------------------------------+
10736|:warning:`warning:` |nbsp| :diagtext:`unknown escape sequence '\\`:placeholder:`A`:diagtext:`'`|
10737+-----------------------------------------------------------------------------------------------+
10738
10739
10740-Wunknown-pragmas
10741-----------------
10742Some of the diagnostics controlled by this flag are enabled by default.
10743
10744**Diagnostic text:**
10745
10746+------------------------------------------------------------------------------------+
10747|:warning:`warning:` |nbsp| :diagtext:`expected 'ON' or 'OFF' or 'DEFAULT' in pragma`|
10748+------------------------------------------------------------------------------------+
10749
10750+--------------------------------------------------------------------------+
10751|:warning:`warning:` |nbsp| :diagtext:`expected end of directive in pragma`|
10752+--------------------------------------------------------------------------+
10753
10754+-----------------------------------------------------------------------+
10755|:warning:`warning:` |nbsp| :diagtext:`unknown pragma in STDC namespace`|
10756+-----------------------------------------------------------------------+
10757
10758+--------------------------------------------------------------------------------------------+
10759|:warning:`warning:` |nbsp| :diagtext:`pragma diagnostic pop could not pop, no matching push`|
10760+--------------------------------------------------------------------------------------------+
10761
10762+--------------------------------------------------------------------------------------------------------------------------+
10763|:warning:`warning:` |nbsp| :diagtext:`pragma diagnostic expected 'error', 'warning', 'ignored', 'fatal', 'push', or 'pop'`|
10764+--------------------------------------------------------------------------------------------------------------------------+
10765
10766+----------------------------------------------------------------------------------------------+
10767|:warning:`warning:` |nbsp| :diagtext:`pragma diagnostic expected option name (e.g. "-Wundef")`|
10768+----------------------------------------------------------------------------------------------+
10769
10770+----------------------------------------------------------------------------+
10771|:warning:`warning:` |nbsp| :diagtext:`unexpected token in pragma diagnostic`|
10772+----------------------------------------------------------------------------+
10773
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010774+-------------------------------------------------------------+
10775|:warning:`warning:` |nbsp| :diagtext:`unknown pragma ignored`|
10776+-------------------------------------------------------------+
10777
10778+----------------------------------------------------------------------------------------------------+
10779|:warning:`warning:` |nbsp| :diagtext:`pragma include\_alias expected '`:placeholder:`A`:diagtext:`'`|
10780+----------------------------------------------------------------------------------------------------+
10781
10782+--------------------------------------------------------------------------------------+
10783|:warning:`warning:` |nbsp| :diagtext:`pragma include\_alias expected include filename`|
10784+--------------------------------------------------------------------------------------+
10785
10786+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10787|:warning:`warning:` |nbsp| :diagtext:`angle-bracketed include <`:placeholder:`A`:diagtext:`> cannot be aliased to double-quoted include "`:placeholder:`B`:diagtext:`"`|
10788+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10789
10790+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10791|:warning:`warning:` |nbsp| :diagtext:`double-quoted include "`:placeholder:`A`:diagtext:`" cannot be aliased to angle-bracketed include <`:placeholder:`B`:diagtext:`>`|
10792+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
10793
10794+----------------------------------------------------------------------------------------------+
10795|:warning:`warning:` |nbsp| :diagtext:`#pragma warning expected '`:placeholder:`A`:diagtext:`'`|
10796+----------------------------------------------------------------------------------------------+
10797
10798+--------------------------------------------------------------------------------+
10799|:warning:`warning:` |nbsp| :diagtext:`#pragma warning expected a warning number`|
10800+--------------------------------------------------------------------------------+
10801
10802+----------------------------------------------------------------------------------------------------+
10803|:warning:`warning:` |nbsp| :diagtext:`#pragma warning(push, level) requires a level between 0 and 4`|
10804+----------------------------------------------------------------------------------------------------+
10805
10806+-----------------------------------------------------------------------------------------------------------------------------------------------+
10807|:warning:`warning:` |nbsp| :diagtext:`#pragma warning expected 'push', 'pop', 'default', 'disable', 'error', 'once', 'suppress', 1, 2, 3, or 4`|
10808+-----------------------------------------------------------------------------------------------------------------------------------------------+
10809
10810+----------------------------------------------------------------------------------------------------+
10811|:warning:`warning:` |nbsp| :diagtext:`pragma STDC FENV\_ACCESS ON is not supported, ignoring pragma`|
10812+----------------------------------------------------------------------------------------------------+
10813
10814
10815-Wunknown-sanitizers
10816--------------------
10817This diagnostic is enabled by default.
10818
10819**Diagnostic text:**
10820
10821+-----------------------------------------------------------------------------------------------+
10822|:warning:`warning:` |nbsp| :diagtext:`unknown sanitizer '`:placeholder:`A`:diagtext:`' ignored`|
10823+-----------------------------------------------------------------------------------------------+
10824
10825
10826-Wunknown-warning-option
10827------------------------
10828This diagnostic is enabled by default.
10829
10830**Diagnostic text:**
10831
Richard Smith66310362017-10-26 21:06:52 +000010832+----------------------------------------------------------------------------------------------------+
10833|:warning:`warning:` |nbsp| :diagtext:`unknown warning group '`:placeholder:`A`:diagtext:`', ignored`|
10834+----------------------------------------------------------------------------------------------------+
10835
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010836+------------------------------------------------------+---------------------+---------------------------------------------------------+--------------------------------------------------------------+
10837|:warning:`warning:` |nbsp| :diagtext:`unknown` |nbsp| |+-------------------+| |nbsp| :diagtext:`option '`:placeholder:`B`:diagtext:`'`|+------------------------------------------------------------+|
10838| ||:diagtext:`warning`|| || ||
10839| |+-------------------+| |+------------------------------------------------------------+|
10840| ||:diagtext:`remark` || ||+----------------------------------------------------------+||
10841| |+-------------------+| |||:diagtext:`; did you mean '`:placeholder:`D`:diagtext:`'?`|||
10842| | | ||+----------------------------------------------------------+||
10843| | | |+------------------------------------------------------------+|
10844+------------------------------------------------------+---------------------+---------------------------------------------------------+--------------------------------------------------------------+
10845
10846+-------------------------------------------------------------------------------------------------------------------------------------------+
10847|:warning:`warning:` |nbsp| :diagtext:`unknown` |nbsp| :placeholder:`A` |nbsp| :diagtext:`warning specifier: '`:placeholder:`B`:diagtext:`'`|
10848+-------------------------------------------------------------------------------------------------------------------------------------------+
10849
10850
10851-Wunnamed-type-template-args
10852----------------------------
10853Some of the diagnostics controlled by this flag are enabled by default.
10854
10855Also controls `-Wc++98-compat-unnamed-type-template-args`_.
10856
10857**Diagnostic text:**
10858
10859+--------------------------------------------------------------------------+
10860|:warning:`warning:` |nbsp| :diagtext:`template argument uses unnamed type`|
10861+--------------------------------------------------------------------------+
10862
10863
10864-Wunneeded-internal-declaration
10865-------------------------------
10866**Diagnostic text:**
10867
10868+---------------------------+----------------------+---------------------------------------------------------------------------------+
10869|:warning:`warning:` |nbsp| |+--------------------+| |nbsp| :placeholder:`B` |nbsp| :diagtext:`is not needed and will not be emitted`|
10870| ||:diagtext:`function`|| |
10871| |+--------------------+| |
10872| ||:diagtext:`variable`|| |
10873| |+--------------------+| |
10874+---------------------------+----------------------+---------------------------------------------------------------------------------+
10875
10876+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
10877|:warning:`warning:` |nbsp| :diagtext:`'static' function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`declared in header file should be declared 'static inline'`|
10878+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
10879
10880
10881-Wunneeded-member-function
10882--------------------------
10883**Diagnostic text:**
10884
10885+---------------------------------------------------------------------------------------------------------------------------------------+
10886|:warning:`warning:` |nbsp| :diagtext:`member function` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not needed and will not be emitted`|
10887+---------------------------------------------------------------------------------------------------------------------------------------+
10888
10889
10890-Wunreachable-code
10891------------------
10892Also controls `-Wunreachable-code-loop-increment`_.
10893
10894**Diagnostic text:**
10895
10896+------------------------------------------------------------------+
10897|:warning:`warning:` |nbsp| :diagtext:`code will never be executed`|
10898+------------------------------------------------------------------+
10899
10900
10901-Wunreachable-code-aggressive
10902-----------------------------
10903Controls `-Wunreachable-code`_, `-Wunreachable-code-break`_, `-Wunreachable-code-return`_.
10904
10905
10906-Wunreachable-code-break
10907------------------------
10908**Diagnostic text:**
10909
10910+---------------------------------------------------------------------+
10911|:warning:`warning:` |nbsp| :diagtext:`'break' will never be executed`|
10912+---------------------------------------------------------------------+
10913
10914
10915-Wunreachable-code-loop-increment
10916---------------------------------
10917**Diagnostic text:**
10918
10919+-------------------------------------------------------------------------------------------------+
10920|:warning:`warning:` |nbsp| :diagtext:`loop will run at most once (loop increment never executed)`|
10921+-------------------------------------------------------------------------------------------------+
10922
10923
10924-Wunreachable-code-return
10925-------------------------
10926**Diagnostic text:**
10927
10928+----------------------------------------------------------------------+
10929|:warning:`warning:` |nbsp| :diagtext:`'return' will never be executed`|
10930+----------------------------------------------------------------------+
10931
10932
10933-Wunsequenced
10934-------------
10935This diagnostic is enabled by default.
10936
10937**Diagnostic text:**
10938
10939+----------------------------------------------------------------------------------------------------+
10940|:warning:`warning:` |nbsp| :diagtext:`multiple unsequenced modifications to` |nbsp| :placeholder:`A`|
10941+----------------------------------------------------------------------------------------------------+
10942
10943+-----------------------------------------------------------------------------------------------------+
10944|:warning:`warning:` |nbsp| :diagtext:`unsequenced modification and access to` |nbsp| :placeholder:`A`|
10945+-----------------------------------------------------------------------------------------------------+
10946
10947
Richard Smith66310362017-10-26 21:06:52 +000010948-Wunsupported-abs
10949-----------------
10950This diagnostic is enabled by default.
10951
10952**Diagnostic text:**
10953
10954+-----------------------------------------------------------------------------------------------------------------------------------------------+
10955|:warning:`warning:` |nbsp| :diagtext:`ignoring '-mabs=2008' option because the '`:placeholder:`A`:diagtext:`' architecture does not support it`|
10956+-----------------------------------------------------------------------------------------------------------------------------------------------+
10957
10958+-------------------------------------------------------------------------------------------------------------------------------------------------+
10959|:warning:`warning:` |nbsp| :diagtext:`ignoring '-mabs=legacy' option because the '`:placeholder:`A`:diagtext:`' architecture does not support it`|
10960+-------------------------------------------------------------------------------------------------------------------------------------------------+
10961
10962
10963-Wunsupported-availability-guard
10964--------------------------------
10965This diagnostic is enabled by default.
10966
10967**Diagnostic text:**
10968
10969+---------------------------+------------------------------------+--------------------------------------------------------------+------------------------------------+---------------------+
10970|:warning:`warning:` |nbsp| |+----------------------------------+| |nbsp| :diagtext:`does not guard availability here; use if (`|+----------------------------------+|:diagtext:`) instead`|
10971| ||:diagtext:`@available` || ||:diagtext:`@available` || |
10972| |+----------------------------------+| |+----------------------------------+| |
10973| ||:diagtext:`\_\_builtin\_available`|| ||:diagtext:`\_\_builtin\_available`|| |
10974| |+----------------------------------+| |+----------------------------------+| |
10975+---------------------------+------------------------------------+--------------------------------------------------------------+------------------------------------+---------------------+
10976
10977
Richard Smithb6a3b4b2016-09-12 05:58:29 +000010978-Wunsupported-cb
10979----------------
10980This diagnostic is enabled by default.
10981
10982**Diagnostic text:**
10983
10984+--------------------------------------------------------------------------------------------------------------------------------------------------------+
10985|:warning:`warning:` |nbsp| :diagtext:`ignoring '-mcompact-branches=' option because the '`:placeholder:`A`:diagtext:`' architecture does not support it`|
10986+--------------------------------------------------------------------------------------------------------------------------------------------------------+
10987
10988
10989-Wunsupported-dll-base-class-template
10990-------------------------------------
10991**Diagnostic text:**
10992
10993+---------------------------------------------------------------------------+------------------------------------+------------------------------------------------------------------------------+
10994|:warning:`warning:` |nbsp| :diagtext:`propagating dll attribute to` |nbsp| |+----------------------------------+| |nbsp| :diagtext:`base class template without dll attribute is not supported`|
10995| ||:diagtext:`already instantiated` || |
10996| |+----------------------------------+| |
10997| ||:diagtext:`explicitly specialized`|| |
10998| |+----------------------------------+| |
10999+---------------------------------------------------------------------------+------------------------------------+------------------------------------------------------------------------------+
11000
11001
11002-Wunsupported-friend
11003--------------------
11004This diagnostic is enabled by default.
11005
11006**Diagnostic text:**
11007
11008+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
11009|:warning:`warning:` |nbsp| :diagtext:`dependent nested name specifier '`:placeholder:`A`:diagtext:`' for friend template declaration is not supported; ignoring this friend declaration`|
11010+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
11011
11012+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
11013|:warning:`warning:` |nbsp| :diagtext:`dependent nested name specifier '`:placeholder:`A`:diagtext:`' for friend class declaration is not supported; turning off access control for` |nbsp| :placeholder:`B`|
11014+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
11015
11016
Richard Smith66310362017-10-26 21:06:52 +000011017-Wunsupported-gpopt
11018-------------------
11019This diagnostic is enabled by default.
11020
11021**Diagnostic text:**
11022
11023+--------------------------------------------------------------------------------------------------+-------------------------------------------+----------------------+
11024|:warning:`warning:` |nbsp| :diagtext:`ignoring '-mgpopt' option as it cannot be used with` |nbsp| |+-----------------------------------------+|:diagtext:`-mabicalls`|
11025| || || |
11026| |+-----------------------------------------+| |
11027| ||:diagtext:`the implicit usage of` |nbsp| || |
11028| |+-----------------------------------------+| |
11029+--------------------------------------------------------------------------------------------------+-------------------------------------------+----------------------+
11030
11031
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011032-Wunsupported-nan
11033-----------------
11034This diagnostic is enabled by default.
11035
11036**Diagnostic text:**
11037
11038+-----------------------------------------------------------------------------------------------------------------------------------------------+
11039|:warning:`warning:` |nbsp| :diagtext:`ignoring '-mnan=2008' option because the '`:placeholder:`A`:diagtext:`' architecture does not support it`|
11040+-----------------------------------------------------------------------------------------------------------------------------------------------+
11041
11042+-------------------------------------------------------------------------------------------------------------------------------------------------+
11043|:warning:`warning:` |nbsp| :diagtext:`ignoring '-mnan=legacy' option because the '`:placeholder:`A`:diagtext:`' architecture does not support it`|
11044+-------------------------------------------------------------------------------------------------------------------------------------------------+
11045
11046
11047-Wunsupported-visibility
11048------------------------
11049This diagnostic is enabled by default.
11050
11051**Diagnostic text:**
11052
11053+------------------------------------------------------------------------------------------------------+
11054|:warning:`warning:` |nbsp| :diagtext:`target does not support 'protected' visibility; using 'default'`|
11055+------------------------------------------------------------------------------------------------------+
11056
11057
Richard Smithcf9f4222017-01-20 19:27:09 +000011058-Wunusable-partial-specialization
11059---------------------------------
11060This diagnostic is an error by default, but the flag ``-Wno-unusable-partial-specialization`` can be used to disable the error.
11061
11062**Diagnostic text:**
11063
11064+-----------------------+----------------------+--------------------------------------------------------------------+----------------------------------+------------------------------------------------------------------------------------------+
11065|:error:`error:` |nbsp| |+--------------------+| |nbsp| :diagtext:`template partial specialization contains` |nbsp| |+--------------------------------+| |nbsp| :diagtext:`that cannot be deduced; this partial specialization will never be used`|
11066| ||:diagtext:`class` || ||:diagtext:`a template parameter`|| |
11067| |+--------------------+| |+--------------------------------+| |
11068| ||:diagtext:`variable`|| ||:diagtext:`template parameters` || |
11069| |+--------------------+| |+--------------------------------+| |
11070+-----------------------+----------------------+--------------------------------------------------------------------+----------------------------------+------------------------------------------------------------------------------------------+
11071
11072
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011073-Wunused
11074--------
11075Some of the diagnostics controlled by this flag are enabled by default.
11076
Richard Smithcf9f4222017-01-20 19:27:09 +000011077Controls `-Wunused-argument`_, `-Wunused-function`_, `-Wunused-label`_, `-Wunused-lambda-capture`_, `-Wunused-local-typedef`_, `-Wunused-private-field`_, `-Wunused-property-ivar`_, `-Wunused-value`_, `-Wunused-variable`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011078
11079
11080-Wunused-argument
11081-----------------
11082This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
11083
11084-Wunused-command-line-argument
11085------------------------------
11086This diagnostic is enabled by default.
11087
11088**Diagnostic text:**
11089
Richard Smith66310362017-10-26 21:06:52 +000011090+-------------------------------------------------------------------------------------------------------------------------------+
11091|:warning:`warning:` |nbsp| :diagtext:`argument '`:placeholder:`A`:diagtext:`' requires profile-guided optimization information`|
11092+-------------------------------------------------------------------------------------------------------------------------------+
11093
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011094+---------------------------------------------------------------------------------------------------------------+
11095|:warning:`warning:` |nbsp| :diagtext:`joined argument expects additional value: '`:placeholder:`A`:diagtext:`'`|
11096+---------------------------------------------------------------------------------------------------------------+
11097
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011098+----------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+
11099|:warning:`warning:` |nbsp| :placeholder:`A`:diagtext:`: '`:placeholder:`B`:diagtext:`' input unused`|+--------------------------------------------------------------------+|
11100| ||+------------------------------------------------------------------+||
11101| ||| |nbsp| :diagtext:`when '`:placeholder:`D`:diagtext:`' is present`|||
11102| ||+------------------------------------------------------------------+||
11103| |+--------------------------------------------------------------------+|
11104| || ||
11105| |+--------------------------------------------------------------------+|
11106+----------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+
11107
11108+----------------------------------------------------------------------------------------------------------------+
11109|:warning:`warning:` |nbsp| :placeholder:`A`:diagtext:`: '`:placeholder:`B`:diagtext:`' input unused in cpp mode`|
11110+----------------------------------------------------------------------------------------------------------------+
11111
11112+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
11113|:warning:`warning:` |nbsp| :placeholder:`A`:diagtext:`: previously preprocessed input`|+---------------------------------------------------------------------------+|
11114| ||+-------------------------------------------------------------------------+||
11115| ||| |nbsp| :diagtext:`unused when '`:placeholder:`C`:diagtext:`' is present`|||
11116| ||+-------------------------------------------------------------------------+||
11117| |+---------------------------------------------------------------------------+|
11118| || ||
11119| |+---------------------------------------------------------------------------+|
11120+--------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+
11121
11122+---------------------------------------------------------------------------------------------------------+
11123|:warning:`warning:` |nbsp| :diagtext:`argument unused during compilation: '`:placeholder:`A`:diagtext:`'`|
11124+---------------------------------------------------------------------------------------------------------+
11125
Richard Smith66310362017-10-26 21:06:52 +000011126+----------------------------------------------------------------------------------------------------------------------+
11127|:warning:`warning:` |nbsp| :diagtext:`the flag '`:placeholder:`A`:diagtext:`' has been deprecated and will be ignored`|
11128+----------------------------------------------------------------------------------------------------------------------+
11129
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011130
11131-Wunused-comparison
11132-------------------
11133This diagnostic is enabled by default.
11134
11135**Diagnostic text:**
11136
11137+---------------------------+-----------------------------------------+--------------------------------------------+
11138|:warning:`warning:` |nbsp| |+---------------------------------------+| |nbsp| :diagtext:`comparison result unused`|
11139| ||+----------------+--------------------+|| |
11140| |||+--------------+|:diagtext:`equality`||| |
11141| |||| || ||| |
11142| |||+--------------+| ||| |
11143| ||||:diagtext:`in`|| ||| |
11144| |||+--------------+| ||| |
11145| ||+----------------+--------------------+|| |
11146| |+---------------------------------------+| |
11147| ||:diagtext:`relational` || |
11148| |+---------------------------------------+| |
11149+---------------------------+-----------------------------------------+--------------------------------------------+
11150
11151
11152-Wunused-const-variable
11153-----------------------
11154**Diagnostic text:**
11155
11156+------------------------------------------------------------------------------+
11157|:warning:`warning:` |nbsp| :diagtext:`unused variable` |nbsp| :placeholder:`A`|
11158+------------------------------------------------------------------------------+
11159
11160
11161-Wunused-exception-parameter
11162----------------------------
11163**Diagnostic text:**
11164
11165+-----------------------------------------------------------------------------------------+
11166|:warning:`warning:` |nbsp| :diagtext:`unused exception parameter` |nbsp| :placeholder:`A`|
11167+-----------------------------------------------------------------------------------------+
11168
11169
11170-Wunused-function
11171-----------------
11172Also controls `-Wunneeded-internal-declaration`_.
11173
11174**Diagnostic text:**
11175
11176+------------------------------------------------------------------------------+
11177|:warning:`warning:` |nbsp| :diagtext:`unused function` |nbsp| :placeholder:`A`|
11178+------------------------------------------------------------------------------+
11179
11180
11181-Wunused-getter-return-value
11182----------------------------
11183This diagnostic is enabled by default.
11184
11185**Diagnostic text:**
11186
11187+------------------------------------------------------------------------------------------------------------------+
11188|:warning:`warning:` |nbsp| :diagtext:`property access result unused - getters should not be used for side effects`|
11189+------------------------------------------------------------------------------------------------------------------+
11190
11191
11192-Wunused-label
11193--------------
11194**Diagnostic text:**
11195
11196+---------------------------------------------------------------------------+
11197|:warning:`warning:` |nbsp| :diagtext:`unused label` |nbsp| :placeholder:`A`|
11198+---------------------------------------------------------------------------+
11199
11200
Richard Smithcf9f4222017-01-20 19:27:09 +000011201-Wunused-lambda-capture
11202-----------------------
11203**Diagnostic text:**
11204
11205+---------------------------------------------------------------------------------------------------------------+--------------------------------------------------+
11206|:warning:`warning:` |nbsp| :diagtext:`lambda capture` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not` |nbsp| |+------------------------------------------------+|
11207| ||:diagtext:`used` ||
11208| |+------------------------------------------------+|
11209| ||:diagtext:`required to be captured for this use`||
11210| |+------------------------------------------------+|
11211+---------------------------------------------------------------------------------------------------------------+--------------------------------------------------+
11212
11213
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011214-Wunused-local-typedef
11215----------------------
11216**Diagnostic text:**
11217
11218+-----------------------------------------------------+------------------------+------------------------+
11219|:warning:`warning:` |nbsp| :diagtext:`unused` |nbsp| |+----------------------+| |nbsp| :placeholder:`B`|
11220| ||:diagtext:`typedef` || |
11221| |+----------------------+| |
11222| ||:diagtext:`type alias`|| |
11223| |+----------------------+| |
11224+-----------------------------------------------------+------------------------+------------------------+
11225
11226
11227-Wunused-local-typedefs
11228-----------------------
11229Synonym for `-Wunused-local-typedef`_.
11230
11231
11232-Wunused-macros
11233---------------
11234**Diagnostic text:**
11235
11236+--------------------------------------------------------+
11237|:warning:`warning:` |nbsp| :diagtext:`macro is not used`|
11238+--------------------------------------------------------+
11239
11240
11241-Wunused-member-function
11242------------------------
11243Also controls `-Wunneeded-member-function`_.
11244
11245**Diagnostic text:**
11246
11247+-------------------------------------------------------------------------------------+
11248|:warning:`warning:` |nbsp| :diagtext:`unused member function` |nbsp| :placeholder:`A`|
11249+-------------------------------------------------------------------------------------+
11250
11251
11252-Wunused-parameter
11253------------------
11254**Diagnostic text:**
11255
11256+-------------------------------------------------------------------------------+
11257|:warning:`warning:` |nbsp| :diagtext:`unused parameter` |nbsp| :placeholder:`A`|
11258+-------------------------------------------------------------------------------+
11259
11260
11261-Wunused-private-field
11262----------------------
11263**Diagnostic text:**
11264
11265+-----------------------------------------------------------------------------------------------------------+
11266|:warning:`warning:` |nbsp| :diagtext:`private field` |nbsp| :placeholder:`A` |nbsp| :diagtext:`is not used`|
11267+-----------------------------------------------------------------------------------------------------------+
11268
11269
11270-Wunused-property-ivar
11271----------------------
11272**Diagnostic text:**
11273
11274+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
11275|:warning:`warning:` |nbsp| :diagtext:`ivar` |nbsp| :placeholder:`A` |nbsp| :diagtext:`which backs the property is not referenced in this property's accessor`|
11276+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
11277
11278
11279-Wunused-result
11280---------------
11281This diagnostic is enabled by default.
11282
11283**Diagnostic text:**
11284
11285+-------------------------------------------------------------------------------------------------------------------------------------------+
11286|:warning:`warning:` |nbsp| :diagtext:`ignoring return value of function declared with` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute`|
11287+-------------------------------------------------------------------------------------------------------------------------------------------+
11288
11289
Richard Smith66310362017-10-26 21:06:52 +000011290-Wunused-template
11291-----------------
11292Also controls `-Wunneeded-internal-declaration`_.
11293
11294**Diagnostic text:**
11295
11296+-----------------------------------------------------+----------------------+----------------------------------------------------+
11297|:warning:`warning:` |nbsp| :diagtext:`unused` |nbsp| |+--------------------+| |nbsp| :diagtext:`template` |nbsp| :placeholder:`B`|
11298| ||:diagtext:`function`|| |
11299| |+--------------------+| |
11300| ||:diagtext:`variable`|| |
11301| |+--------------------+| |
11302+-----------------------------------------------------+----------------------+----------------------------------------------------+
11303
11304
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011305-Wunused-value
11306--------------
11307This diagnostic is enabled by default.
11308
Richard Smith8cba2912016-09-14 01:55:42 +000011309Also controls `-Wunevaluated-expression`_, `-Wunused-comparison`_, `-Wunused-result`_.
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011310
11311**Diagnostic text:**
11312
11313+-------------------------------------------------------------------------------------------------------------------------------------------+
11314|:warning:`warning:` |nbsp| :diagtext:`ignoring return value of function declared with` |nbsp| :placeholder:`A` |nbsp| :diagtext:`attribute`|
11315+-------------------------------------------------------------------------------------------------------------------------------------------+
11316
11317+----------------------------------------------------------------------------------------------------------------------------+
11318|:warning:`warning:` |nbsp| :diagtext:`container access result unused - container access should not be used for side effects`|
11319+----------------------------------------------------------------------------------------------------------------------------+
11320
11321+---------------------------------------------------------------+
11322|:warning:`warning:` |nbsp| :diagtext:`expression result unused`|
11323+---------------------------------------------------------------+
11324
11325+-----------------------------------------------------------------------------------------------+
11326|:warning:`warning:` |nbsp| :diagtext:`expression result unused; should this cast be to 'void'?`|
11327+-----------------------------------------------------------------------------------------------+
11328
11329
11330-Wunused-variable
11331-----------------
11332Also controls `-Wunused-const-variable`_.
11333
11334**Diagnostic text:**
11335
11336+------------------------------------------------------------------------------+
11337|:warning:`warning:` |nbsp| :diagtext:`unused variable` |nbsp| :placeholder:`A`|
11338+------------------------------------------------------------------------------+
11339
11340
11341-Wunused-volatile-lvalue
11342------------------------
11343This diagnostic is enabled by default.
11344
11345**Diagnostic text:**
11346
11347+----------------------------------------------------------------------------------------------------------------+
11348|:warning:`warning:` |nbsp| :diagtext:`expression result unused; assign into a variable to force a volatile load`|
11349+----------------------------------------------------------------------------------------------------------------+
11350
11351
11352-Wused-but-marked-unused
11353------------------------
11354**Diagnostic text:**
11355
11356+---------------------------------------------------------------------------------------------+
11357|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`was marked unused but was used`|
11358+---------------------------------------------------------------------------------------------+
11359
11360
11361-Wuser-defined-literals
11362-----------------------
11363This diagnostic is enabled by default.
11364
11365**Diagnostic text:**
11366
11367+--------------------------------------------------------------------------------------------------------+----------------------------------------------------+
11368|:warning:`warning:` |nbsp| :diagtext:`user-defined literal suffixes not starting with '\_' are reserved`|+--------------------------------------------------+|
11369| ||:diagtext:`; no literal will invoke this operator`||
11370| |+--------------------------------------------------+|
11371| || ||
11372| |+--------------------------------------------------+|
11373+--------------------------------------------------------------------------------------------------------+----------------------------------------------------+
11374
11375
Richard Smithcf9f4222017-01-20 19:27:09 +000011376-Wuser-defined-warnings
11377-----------------------
11378This diagnostic is enabled by default.
11379
11380**Diagnostic text:**
11381
11382The text of this diagnostic is not controlled by Clang.
11383
11384
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011385-Wvarargs
11386---------
11387This diagnostic is enabled by default.
11388
11389**Diagnostic text:**
11390
11391+-----------------------------------------------------------------------------------------------------+
11392|:warning:`warning:` |nbsp| :diagtext:`second argument to 'va\_start' is not the last named parameter`|
11393+-----------------------------------------------------------------------------------------------------+
11394
11395+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
11396|:warning:`warning:` |nbsp| :diagtext:`second argument to 'va\_arg' is of promotable type` |nbsp| :placeholder:`A`:diagtext:`; this va\_arg has undefined behavior because arguments will be promoted to` |nbsp| :placeholder:`B`|
11397+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
11398
11399+------------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------+
11400|:warning:`warning:` |nbsp| :diagtext:`passing` |nbsp| |+---------------------------------------------------------------+| |nbsp| :diagtext:`to 'va\_start' has undefined behavior`|
11401| ||:diagtext:`an object that undergoes default argument promotion`|| |
11402| |+---------------------------------------------------------------+| |
11403| ||:diagtext:`an object of reference type` || |
11404| |+---------------------------------------------------------------+| |
11405| ||:diagtext:`a parameter declared with the 'register' keyword` || |
11406| |+---------------------------------------------------------------+| |
11407+------------------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------+
11408
11409
11410-Wvariadic-macros
11411-----------------
Richard Smith66310362017-10-26 21:06:52 +000011412Some of the diagnostics controlled by this flag are enabled by default.
11413
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011414**Diagnostic text:**
11415
11416+--------------------------------------------------------------------------------+
11417|:warning:`warning:` |nbsp| :diagtext:`named variadic macros are a GNU extension`|
11418+--------------------------------------------------------------------------------+
11419
Richard Smith66310362017-10-26 21:06:52 +000011420+-----------------------------------------------------------------------------------------------------------+
11421|:warning:`warning:` |nbsp| :diagtext:`\_\_VA\_OPT\_\_ can only appear in the expansion of a variadic macro`|
11422+-----------------------------------------------------------------------------------------------------------+
11423
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011424+------------------------------------------------------------------------+
11425|:warning:`warning:` |nbsp| :diagtext:`variadic macros are a C99 feature`|
11426+------------------------------------------------------------------------+
11427
11428
Richard Smithcf9f4222017-01-20 19:27:09 +000011429-Wvec-elem-size
11430---------------
11431This diagnostic is an error by default, but the flag ``-Wno-vec-elem-size`` can be used to disable the error.
11432
11433**Diagnostic text:**
11434
11435+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
11436|:error:`error:` |nbsp| :diagtext:`vector operands do not have the same elements sizes (`:placeholder:`A` |nbsp| :diagtext:`and` |nbsp| :placeholder:`B`:diagtext:`)`|
11437+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
11438
11439
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011440-Wvector-conversion
11441-------------------
11442**Diagnostic text:**
11443
11444+------------------------------------------------------------------------+----------------------------------------------------------------+
11445|:warning:`warning:` |nbsp| :diagtext:`incompatible vector types` |nbsp| |+--------------------------------------------------------------+|
11446| ||:diagtext:`assigning to different types` ||
11447| |+--------------------------------------------------------------+|
11448| ||:diagtext:`passing to parameter of different type` ||
11449| |+--------------------------------------------------------------+|
11450| ||:diagtext:`returning from function with different return type`||
11451| |+--------------------------------------------------------------+|
11452| ||:diagtext:`converting between types` ||
11453| |+--------------------------------------------------------------+|
11454| ||:diagtext:`initializing with expression of different type` ||
11455| |+--------------------------------------------------------------+|
11456| ||:diagtext:`sending to parameter of different type` ||
11457| |+--------------------------------------------------------------+|
11458| ||:diagtext:`casting between types` ||
11459| |+--------------------------------------------------------------+|
11460+------------------------------------------------------------------------+----------------------------------------------------------------+
11461
11462
11463-Wvector-conversions
11464--------------------
11465Synonym for `-Wvector-conversion`_.
11466
11467
11468-Wvexing-parse
11469--------------
11470This diagnostic is enabled by default.
11471
11472**Diagnostic text:**
11473
11474+----------------------------------------------------------------------------------------------+
11475|:warning:`warning:` |nbsp| :diagtext:`empty parentheses interpreted as a function declaration`|
11476+----------------------------------------------------------------------------------------------+
11477
11478+-----------------------------------------------------------------------------------------------+
11479|:warning:`warning:` |nbsp| :diagtext:`parentheses were disambiguated as a function declaration`|
11480+-----------------------------------------------------------------------------------------------+
11481
Richard Smith66310362017-10-26 21:06:52 +000011482+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
11483|:warning:`warning:` |nbsp| :diagtext:`parentheses were disambiguated as redundant parentheses around declaration of variable named` |nbsp| :placeholder:`A`|
11484+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
11485
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011486
11487-Wvisibility
11488------------
11489This diagnostic is enabled by default.
11490
11491**Diagnostic text:**
11492
11493+---------------------------------------------------------------------------------------------------------------------------------------------+
11494|:warning:`warning:` |nbsp| :diagtext:`declaration of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`will not be visible outside of this function`|
11495+---------------------------------------------------------------------------------------------------------------------------------------------+
11496
11497+----------------------------------------------------------------------------------------------------------------------------------------------+
11498|:warning:`warning:` |nbsp| :diagtext:`redefinition of` |nbsp| :placeholder:`A` |nbsp| :diagtext:`will not be visible outside of this function`|
11499+----------------------------------------------------------------------------------------------------------------------------------------------+
11500
11501
11502-Wvla
11503-----
11504**Diagnostic text:**
11505
11506+-----------------------------------------------------------------+
11507|:warning:`warning:` |nbsp| :diagtext:`variable length array used`|
11508+-----------------------------------------------------------------+
11509
11510
11511-Wvla-extension
11512---------------
11513**Diagnostic text:**
11514
11515+-------------------------------------------------------------------------------+
11516|:warning:`warning:` |nbsp| :diagtext:`variable length arrays are a C99 feature`|
11517+-------------------------------------------------------------------------------+
11518
11519
11520-Wvoid-ptr-dereference
11521----------------------
11522This diagnostic is enabled by default.
11523
11524**Diagnostic text:**
11525
11526+--------------------------------------------------------------------------------------------------------------------+
11527|:warning:`warning:` |nbsp| :diagtext:`ISO C++ does not allow indirection on operand of type` |nbsp| :placeholder:`A`|
11528+--------------------------------------------------------------------------------------------------------------------+
11529
11530
11531-Wvolatile-register-var
11532-----------------------
11533This diagnostic flag exists for GCC compatibility, and has no effect in Clang.
11534
11535-Wweak-template-vtables
11536-----------------------
11537**Diagnostic text:**
11538
11539+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
11540|:warning:`warning:` |nbsp| :diagtext:`explicit template instantiation` |nbsp| :placeholder:`A` |nbsp| :diagtext:`will emit a vtable in every translation unit`|
11541+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
11542
11543
11544-Wweak-vtables
11545--------------
11546**Diagnostic text:**
11547
11548+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
11549|:warning:`warning:` |nbsp| :placeholder:`A` |nbsp| :diagtext:`has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit`|
11550+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
11551
11552
11553-Wwritable-strings
11554------------------
11555This diagnostic is enabled by default.
11556
11557Also controls `-Wdeprecated-writable-strings`_.
11558
11559**Diagnostic text:**
11560
11561+-------------------------------------------------------------------------------------------------------------------------+
11562|:warning:`warning:` |nbsp| :diagtext:`ISO C++11 does not allow conversion from string literal to` |nbsp| :placeholder:`A`|
11563+-------------------------------------------------------------------------------------------------------------------------+
11564
11565
11566-Wwrite-strings
11567---------------
11568Synonym for `-Wwritable-strings`_.
11569
11570
Richard Smith66310362017-10-26 21:06:52 +000011571-Wzero-as-null-pointer-constant
11572-------------------------------
11573**Diagnostic text:**
11574
11575+--------------------------------------------------------------------+
11576|:warning:`warning:` |nbsp| :diagtext:`zero as null pointer constant`|
11577+--------------------------------------------------------------------+
11578
11579
Richard Smithb6a3b4b2016-09-12 05:58:29 +000011580-Wzero-length-array
11581-------------------
11582**Diagnostic text:**
11583
11584+------------------------------------------------------------------------+
11585|:warning:`warning:` |nbsp| :diagtext:`zero size arrays are an extension`|
11586+------------------------------------------------------------------------+
11587
11588