OpenACC loop construct.
[official-gcc.git] / gcc / ada / warnsw.adb
blobf07fdf92902e8f8b38d74ad4cd43dd4c3b0a6737
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- W A R N S W --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1999-2013, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
20 -- --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
23 -- --
24 ------------------------------------------------------------------------------
26 with Err_Vars; use Err_Vars;
27 with Opt; use Opt;
28 with Output; use Output;
30 package body Warnsw is
32 ----------------------
33 -- Restore_Warnings --
34 ----------------------
36 procedure Restore_Warnings (W : Warning_Record) is
37 begin
38 Address_Clause_Overlay_Warnings :=
39 W.Address_Clause_Overlay_Warnings;
40 Check_Unreferenced :=
41 W.Check_Unreferenced;
42 Check_Unreferenced_Formals :=
43 W.Check_Unreferenced_Formals;
44 Check_Withs :=
45 W.Check_Withs;
46 Constant_Condition_Warnings :=
47 W.Constant_Condition_Warnings;
48 Elab_Warnings :=
49 W.Elab_Warnings;
50 Elab_Info_Messages :=
51 W.Elab_Info_Messages;
52 Implementation_Unit_Warnings :=
53 W.Implementation_Unit_Warnings;
54 Ineffective_Inline_Warnings :=
55 W.Ineffective_Inline_Warnings;
56 List_Body_Required_Info :=
57 W.List_Body_Required_Info;
58 List_Inherited_Aspects :=
59 W.List_Inherited_Aspects;
60 Warning_Doc_Switch :=
61 W.Warning_Doc_Switch;
62 Warn_On_Ada_2005_Compatibility :=
63 W.Warn_On_Ada_2005_Compatibility;
64 Warn_On_Ada_2012_Compatibility :=
65 W.Warn_On_Ada_2012_Compatibility;
66 Warn_On_All_Unread_Out_Parameters :=
67 W.Warn_On_All_Unread_Out_Parameters;
68 Warn_On_Assertion_Failure :=
69 W.Warn_On_Assertion_Failure;
70 Warn_On_Assumed_Low_Bound :=
71 W.Warn_On_Assumed_Low_Bound;
72 Warn_On_Atomic_Synchronization :=
73 W.Warn_On_Atomic_Synchronization;
74 Warn_On_Bad_Fixed_Value :=
75 W.Warn_On_Bad_Fixed_Value;
76 Warn_On_Biased_Representation :=
77 W.Warn_On_Biased_Representation;
78 Warn_On_Constant :=
79 W.Warn_On_Constant;
80 Warn_On_Deleted_Code :=
81 W.Warn_On_Deleted_Code;
82 Warn_On_Dereference :=
83 W.Warn_On_Dereference;
84 Warn_On_Export_Import :=
85 W.Warn_On_Export_Import;
86 Warn_On_Hiding :=
87 W.Warn_On_Hiding;
88 Warn_On_Modified_Unread :=
89 W.Warn_On_Modified_Unread;
90 Warn_On_No_Value_Assigned :=
91 W.Warn_On_No_Value_Assigned;
92 Warn_On_Non_Local_Exception :=
93 W.Warn_On_Non_Local_Exception;
94 Warn_On_Object_Renames_Function :=
95 W.Warn_On_Object_Renames_Function;
96 Warn_On_Obsolescent_Feature :=
97 W.Warn_On_Obsolescent_Feature;
98 Warn_On_Overlap :=
99 W.Warn_On_Overlap;
100 Warn_On_Overridden_Size :=
101 W.Warn_On_Overridden_Size;
102 Warn_On_Parameter_Order :=
103 W.Warn_On_Parameter_Order;
104 Warn_On_Questionable_Missing_Parens :=
105 W.Warn_On_Questionable_Missing_Parens;
106 Warn_On_Record_Holes :=
107 W.Warn_On_Record_Holes;
108 Warn_On_Redundant_Constructs :=
109 W.Warn_On_Redundant_Constructs;
110 Warn_On_Reverse_Bit_Order :=
111 W.Warn_On_Reverse_Bit_Order;
112 Warn_On_Standard_Redefinition :=
113 W.Warn_On_Standard_Redefinition;
114 Warn_On_Suspicious_Contract :=
115 W.Warn_On_Suspicious_Contract;
116 Warn_On_Unchecked_Conversion :=
117 W.Warn_On_Unchecked_Conversion;
118 Warn_On_Unordered_Enumeration_Type :=
119 W.Warn_On_Unordered_Enumeration_Type;
120 Warn_On_Unrecognized_Pragma :=
121 W.Warn_On_Unrecognized_Pragma;
122 Warn_On_Unrepped_Components :=
123 W.Warn_On_Unrepped_Components;
124 Warn_On_Warnings_Off :=
125 W.Warn_On_Warnings_Off;
126 end Restore_Warnings;
128 -------------------
129 -- Save_Warnings --
130 -------------------
132 function Save_Warnings return Warning_Record is
133 W : Warning_Record;
135 begin
136 W.Address_Clause_Overlay_Warnings :=
137 Address_Clause_Overlay_Warnings;
138 W.Check_Unreferenced :=
139 Check_Unreferenced;
140 W.Check_Unreferenced_Formals :=
141 Check_Unreferenced_Formals;
142 W.Check_Withs :=
143 Check_Withs;
144 W.Constant_Condition_Warnings :=
145 Constant_Condition_Warnings;
146 W.Elab_Info_Messages :=
147 Elab_Info_Messages;
148 W.Elab_Warnings :=
149 Elab_Warnings;
150 W.Implementation_Unit_Warnings :=
151 Implementation_Unit_Warnings;
152 W.Ineffective_Inline_Warnings :=
153 Ineffective_Inline_Warnings;
154 W.List_Body_Required_Info :=
155 List_Body_Required_Info;
156 W.List_Inherited_Aspects :=
157 List_Inherited_Aspects;
158 W.Warning_Doc_Switch :=
159 Warning_Doc_Switch;
160 W.Warn_On_Ada_2005_Compatibility :=
161 Warn_On_Ada_2005_Compatibility;
162 W.Warn_On_Ada_2012_Compatibility :=
163 Warn_On_Ada_2012_Compatibility;
164 W.Warn_On_All_Unread_Out_Parameters :=
165 Warn_On_All_Unread_Out_Parameters;
166 W.Warn_On_Assertion_Failure :=
167 Warn_On_Assertion_Failure;
168 W.Warn_On_Assumed_Low_Bound :=
169 Warn_On_Assumed_Low_Bound;
170 W.Warn_On_Atomic_Synchronization :=
171 Warn_On_Atomic_Synchronization;
172 W.Warn_On_Bad_Fixed_Value :=
173 Warn_On_Bad_Fixed_Value;
174 W.Warn_On_Biased_Representation :=
175 Warn_On_Biased_Representation;
176 W.Warn_On_Constant :=
177 Warn_On_Constant;
178 W.Warn_On_Deleted_Code :=
179 Warn_On_Deleted_Code;
180 W.Warn_On_Dereference :=
181 Warn_On_Dereference;
182 W.Warn_On_Export_Import :=
183 Warn_On_Export_Import;
184 W.Warn_On_Hiding :=
185 Warn_On_Hiding;
186 W.Warn_On_Modified_Unread :=
187 Warn_On_Modified_Unread;
188 W.Warn_On_No_Value_Assigned :=
189 Warn_On_No_Value_Assigned;
190 W.Warn_On_Non_Local_Exception :=
191 Warn_On_Non_Local_Exception;
192 W.Warn_On_Object_Renames_Function :=
193 Warn_On_Object_Renames_Function;
194 W.Warn_On_Obsolescent_Feature :=
195 Warn_On_Obsolescent_Feature;
196 W.Warn_On_Overlap :=
197 Warn_On_Overlap;
198 W.Warn_On_Overridden_Size :=
199 Warn_On_Overridden_Size;
200 W.Warn_On_Parameter_Order :=
201 Warn_On_Parameter_Order;
202 W.Warn_On_Questionable_Missing_Parens :=
203 Warn_On_Questionable_Missing_Parens;
204 W.Warn_On_Record_Holes :=
205 Warn_On_Record_Holes;
206 W.Warn_On_Redundant_Constructs :=
207 Warn_On_Redundant_Constructs;
208 W.Warn_On_Reverse_Bit_Order :=
209 Warn_On_Reverse_Bit_Order;
210 W.Warn_On_Standard_Redefinition :=
211 Warn_On_Standard_Redefinition;
212 W.Warn_On_Suspicious_Contract :=
213 Warn_On_Suspicious_Contract;
214 W.Warn_On_Unchecked_Conversion :=
215 Warn_On_Unchecked_Conversion;
216 W.Warn_On_Unordered_Enumeration_Type :=
217 Warn_On_Unordered_Enumeration_Type;
218 W.Warn_On_Unrecognized_Pragma :=
219 Warn_On_Unrecognized_Pragma;
220 W.Warn_On_Unrepped_Components :=
221 Warn_On_Unrepped_Components;
222 W.Warn_On_Warnings_Off :=
223 Warn_On_Warnings_Off;
225 return W;
226 end Save_Warnings;
228 ----------------------------
229 -- Set_Dot_Warning_Switch --
230 ----------------------------
232 function Set_Dot_Warning_Switch (C : Character) return Boolean is
233 begin
234 case C is
235 when 'a' =>
236 Warn_On_Assertion_Failure := True;
238 when 'A' =>
239 Warn_On_Assertion_Failure := False;
241 when 'b' =>
242 Warn_On_Biased_Representation := True;
244 when 'B' =>
245 Warn_On_Biased_Representation := False;
247 when 'c' =>
248 Warn_On_Unrepped_Components := True;
250 when 'C' =>
251 Warn_On_Unrepped_Components := False;
253 when 'd' =>
254 Warning_Doc_Switch := True;
256 when 'D' =>
257 Warning_Doc_Switch := False;
259 when 'e' =>
260 Address_Clause_Overlay_Warnings := True;
261 Check_Unreferenced := True;
262 Check_Unreferenced_Formals := True;
263 Check_Withs := True;
264 Constant_Condition_Warnings := True;
265 Elab_Warnings := True;
266 Implementation_Unit_Warnings := True;
267 Ineffective_Inline_Warnings := True;
268 List_Body_Required_Info := True;
269 List_Inherited_Aspects := True;
270 Warn_On_Ada_2005_Compatibility := True;
271 Warn_On_Ada_2012_Compatibility := True;
272 Warn_On_All_Unread_Out_Parameters := True;
273 Warn_On_Assertion_Failure := True;
274 Warn_On_Assumed_Low_Bound := True;
275 Warn_On_Atomic_Synchronization := True;
276 Warn_On_Bad_Fixed_Value := True;
277 Warn_On_Biased_Representation := True;
278 Warn_On_Constant := True;
279 Warn_On_Deleted_Code := True;
280 Warn_On_Dereference := True;
281 Warn_On_Export_Import := True;
282 Warn_On_Hiding := True;
283 Warn_On_Modified_Unread := True;
284 Warn_On_No_Value_Assigned := True;
285 Warn_On_Non_Local_Exception := True;
286 Warn_On_Object_Renames_Function := True;
287 Warn_On_Obsolescent_Feature := True;
288 Warn_On_Overlap := True;
289 Warn_On_Overridden_Size := True;
290 Warn_On_Parameter_Order := True;
291 Warn_On_Questionable_Missing_Parens := True;
292 Warn_On_Record_Holes := True;
293 Warn_On_Redundant_Constructs := True;
294 Warn_On_Reverse_Bit_Order := True;
295 Warn_On_Standard_Redefinition := True;
296 Warn_On_Suspicious_Contract := True;
297 Warn_On_Unchecked_Conversion := True;
298 Warn_On_Unordered_Enumeration_Type := True;
299 Warn_On_Unrecognized_Pragma := True;
300 Warn_On_Unrepped_Components := True;
301 Warn_On_Warnings_Off := True;
303 when 'g' =>
304 Set_GNAT_Mode_Warnings;
306 when 'h' =>
307 Warn_On_Record_Holes := True;
309 when 'H' =>
310 Warn_On_Record_Holes := False;
312 when 'i' =>
313 Warn_On_Overlap := True;
315 when 'I' =>
316 Warn_On_Overlap := False;
318 when 'k' =>
319 Warn_On_Standard_Redefinition := True;
321 when 'K' =>
322 Warn_On_Standard_Redefinition := False;
324 when 'l' =>
325 List_Inherited_Aspects := True;
327 when 'L' =>
328 List_Inherited_Aspects := False;
330 when 'm' =>
331 Warn_On_Suspicious_Modulus_Value := True;
333 when 'M' =>
334 Warn_On_Suspicious_Modulus_Value := False;
336 when 'n' =>
337 Warn_On_Atomic_Synchronization := True;
339 when 'N' =>
340 Warn_On_Atomic_Synchronization := False;
342 when 'o' =>
343 Warn_On_All_Unread_Out_Parameters := True;
345 when 'O' =>
346 Warn_On_All_Unread_Out_Parameters := False;
348 when 'p' =>
349 Warn_On_Parameter_Order := True;
351 when 'P' =>
352 Warn_On_Parameter_Order := False;
354 when 'r' =>
355 Warn_On_Object_Renames_Function := True;
357 when 'R' =>
358 Warn_On_Object_Renames_Function := False;
360 when 's' =>
361 Warn_On_Overridden_Size := True;
363 when 'S' =>
364 Warn_On_Overridden_Size := False;
366 when 't' =>
367 Warn_On_Suspicious_Contract := True;
369 when 'T' =>
370 Warn_On_Suspicious_Contract := False;
372 when 'u' =>
373 Warn_On_Unordered_Enumeration_Type := True;
375 when 'U' =>
376 Warn_On_Unordered_Enumeration_Type := False;
378 when 'v' =>
379 Warn_On_Reverse_Bit_Order := True;
381 when 'V' =>
382 Warn_On_Reverse_Bit_Order := False;
384 when 'w' =>
385 Warn_On_Warnings_Off := True;
387 when 'W' =>
388 Warn_On_Warnings_Off := False;
390 when 'x' =>
391 Warn_On_Non_Local_Exception := True;
393 when 'X' =>
394 Warn_On_Non_Local_Exception := False;
395 No_Warn_On_Non_Local_Exception := True;
397 when 'y' =>
398 List_Body_Required_Info := True;
400 when 'Y' =>
401 List_Body_Required_Info := False;
403 when others =>
404 if Ignore_Unrecognized_VWY_Switches then
405 Write_Line ("unrecognized switch -gnatw." & C & " ignored");
406 else
407 return False;
408 end if;
409 end case;
411 return True;
412 end Set_Dot_Warning_Switch;
414 ----------------------------
415 -- Set_GNAT_Mode_Warnings --
416 ----------------------------
418 procedure Set_GNAT_Mode_Warnings is
419 begin
420 Address_Clause_Overlay_Warnings := True;
421 Check_Unreferenced := True;
422 Check_Unreferenced_Formals := True;
423 Check_Withs := True;
424 Constant_Condition_Warnings := True;
425 Elab_Warnings := False;
426 Implementation_Unit_Warnings := False;
427 Ineffective_Inline_Warnings := True;
428 List_Body_Required_Info := False;
429 List_Inherited_Aspects := False;
430 Warning_Doc_Switch := False;
431 Warn_On_Ada_2005_Compatibility := True;
432 Warn_On_Ada_2012_Compatibility := True;
433 Warn_On_All_Unread_Out_Parameters := False;
434 Warn_On_Assertion_Failure := True;
435 Warn_On_Assumed_Low_Bound := True;
436 Warn_On_Atomic_Synchronization := False;
437 Warn_On_Bad_Fixed_Value := True;
438 Warn_On_Biased_Representation := True;
439 Warn_On_Constant := True;
440 Warn_On_Deleted_Code := False;
441 Warn_On_Dereference := False;
442 Warn_On_Export_Import := True;
443 Warn_On_Hiding := False;
444 Warn_On_Modified_Unread := True;
445 Warn_On_No_Value_Assigned := True;
446 Warn_On_Non_Local_Exception := False;
447 Warn_On_Object_Renames_Function := True;
448 Warn_On_Obsolescent_Feature := True;
449 Warn_On_Overlap := True;
450 Warn_On_Overridden_Size := True;
451 Warn_On_Parameter_Order := True;
452 Warn_On_Questionable_Missing_Parens := True;
453 Warn_On_Record_Holes := False;
454 Warn_On_Redundant_Constructs := True;
455 Warn_On_Reverse_Bit_Order := False;
456 Warn_On_Suspicious_Contract := True;
457 Warn_On_Unchecked_Conversion := True;
458 Warn_On_Unordered_Enumeration_Type := False;
459 Warn_On_Unrecognized_Pragma := True;
460 Warn_On_Unrepped_Components := False;
461 Warn_On_Warnings_Off := False;
462 end Set_GNAT_Mode_Warnings;
464 ------------------------
465 -- Set_Warning_Switch --
466 ------------------------
468 function Set_Warning_Switch (C : Character) return Boolean is
469 begin
470 case C is
471 when 'a' =>
472 Check_Unreferenced := True;
473 Check_Unreferenced_Formals := True;
474 Check_Withs := True;
475 Constant_Condition_Warnings := True;
476 Implementation_Unit_Warnings := True;
477 Ineffective_Inline_Warnings := True;
478 Warn_On_Ada_2005_Compatibility := True;
479 Warn_On_Ada_2012_Compatibility := True;
480 Warn_On_Assertion_Failure := True;
481 Warn_On_Assumed_Low_Bound := True;
482 Warn_On_Bad_Fixed_Value := True;
483 Warn_On_Biased_Representation := True;
484 Warn_On_Constant := True;
485 Warn_On_Export_Import := True;
486 Warn_On_Modified_Unread := True;
487 Warn_On_No_Value_Assigned := True;
488 Warn_On_Non_Local_Exception := True;
489 Warn_On_Object_Renames_Function := True;
490 Warn_On_Obsolescent_Feature := True;
491 Warn_On_Overlap := True;
492 Warn_On_Parameter_Order := True;
493 Warn_On_Questionable_Missing_Parens := True;
494 Warn_On_Redundant_Constructs := True;
495 Warn_On_Reverse_Bit_Order := True;
496 Warn_On_Suspicious_Contract := True;
497 Warn_On_Unchecked_Conversion := True;
498 Warn_On_Unrecognized_Pragma := True;
499 Warn_On_Unrepped_Components := True;
501 when 'A' =>
502 Address_Clause_Overlay_Warnings := False;
503 Check_Unreferenced := False;
504 Check_Unreferenced_Formals := False;
505 Check_Withs := False;
506 Constant_Condition_Warnings := False;
507 Elab_Warnings := False;
508 Implementation_Unit_Warnings := False;
509 Ineffective_Inline_Warnings := False;
510 List_Body_Required_Info := False;
511 List_Inherited_Aspects := False;
512 Warning_Doc_Switch := False;
513 Warn_On_Ada_2005_Compatibility := False;
514 Warn_On_Ada_2012_Compatibility := False;
515 Warn_On_All_Unread_Out_Parameters := False;
516 Warn_On_Assertion_Failure := False;
517 Warn_On_Assumed_Low_Bound := False;
518 Warn_On_Bad_Fixed_Value := False;
519 Warn_On_Biased_Representation := False;
520 Warn_On_Constant := False;
521 Warn_On_Deleted_Code := False;
522 Warn_On_Dereference := False;
523 Warn_On_Export_Import := False;
524 Warn_On_Hiding := False;
525 Warn_On_Modified_Unread := False;
526 Warn_On_No_Value_Assigned := False;
527 Warn_On_Non_Local_Exception := False;
528 Warn_On_Object_Renames_Function := False;
529 Warn_On_Obsolescent_Feature := False;
530 Warn_On_Overlap := False;
531 Warn_On_Overridden_Size := False;
532 Warn_On_Parameter_Order := False;
533 Warn_On_Record_Holes := False;
534 Warn_On_Questionable_Missing_Parens := False;
535 Warn_On_Redundant_Constructs := False;
536 Warn_On_Reverse_Bit_Order := False;
537 Warn_On_Standard_Redefinition := False;
538 Warn_On_Suspicious_Contract := False;
539 Warn_On_Suspicious_Modulus_Value := False;
540 Warn_On_Unchecked_Conversion := False;
541 Warn_On_Unordered_Enumeration_Type := False;
542 Warn_On_Unrecognized_Pragma := False;
543 Warn_On_Unrepped_Components := False;
544 Warn_On_Warnings_Off := False;
546 No_Warn_On_Non_Local_Exception := True;
548 when 'b' =>
549 Warn_On_Bad_Fixed_Value := True;
551 when 'B' =>
552 Warn_On_Bad_Fixed_Value := False;
554 when 'c' =>
555 Constant_Condition_Warnings := True;
557 when 'C' =>
558 Constant_Condition_Warnings := False;
560 when 'd' =>
561 Warn_On_Dereference := True;
563 when 'D' =>
564 Warn_On_Dereference := False;
566 when 'e' =>
567 Warning_Mode := Treat_As_Error;
569 when 'f' =>
570 Check_Unreferenced_Formals := True;
572 when 'F' =>
573 Check_Unreferenced_Formals := False;
575 when 'g' =>
576 Warn_On_Unrecognized_Pragma := True;
578 when 'G' =>
579 Warn_On_Unrecognized_Pragma := False;
581 when 'h' =>
582 Warn_On_Hiding := True;
584 when 'H' =>
585 Warn_On_Hiding := False;
587 when 'i' =>
588 Implementation_Unit_Warnings := True;
590 when 'I' =>
591 Implementation_Unit_Warnings := False;
593 when 'j' =>
594 Warn_On_Obsolescent_Feature := True;
596 when 'J' =>
597 Warn_On_Obsolescent_Feature := False;
599 when 'k' =>
600 Warn_On_Constant := True;
602 when 'K' =>
603 Warn_On_Constant := False;
605 when 'l' =>
606 Elab_Warnings := True;
608 when 'L' =>
609 Elab_Warnings := False;
611 when 'm' =>
612 Warn_On_Modified_Unread := True;
614 when 'M' =>
615 Warn_On_Modified_Unread := False;
617 when 'n' =>
618 Warning_Mode := Normal;
620 when 'o' =>
621 Address_Clause_Overlay_Warnings := True;
623 when 'O' =>
624 Address_Clause_Overlay_Warnings := False;
626 when 'p' =>
627 Ineffective_Inline_Warnings := True;
629 when 'P' =>
630 Ineffective_Inline_Warnings := False;
632 when 'q' =>
633 Warn_On_Questionable_Missing_Parens := True;
635 when 'Q' =>
636 Warn_On_Questionable_Missing_Parens := False;
638 when 'r' =>
639 Warn_On_Redundant_Constructs := True;
641 when 'R' =>
642 Warn_On_Redundant_Constructs := False;
644 when 's' =>
645 Warning_Mode := Suppress;
647 when 't' =>
648 Warn_On_Deleted_Code := True;
650 when 'T' =>
651 Warn_On_Deleted_Code := False;
653 when 'u' =>
654 Check_Unreferenced := True;
655 Check_Withs := True;
656 Check_Unreferenced_Formals := True;
658 when 'U' =>
659 Check_Unreferenced := False;
660 Check_Withs := False;
661 Check_Unreferenced_Formals := False;
663 when 'v' =>
664 Warn_On_No_Value_Assigned := True;
666 when 'V' =>
667 Warn_On_No_Value_Assigned := False;
669 when 'w' =>
670 Warn_On_Assumed_Low_Bound := True;
672 when 'W' =>
673 Warn_On_Assumed_Low_Bound := False;
675 when 'x' =>
676 Warn_On_Export_Import := True;
678 when 'X' =>
679 Warn_On_Export_Import := False;
681 when 'y' =>
682 Warn_On_Ada_2005_Compatibility := True;
683 Warn_On_Ada_2012_Compatibility := True;
685 when 'Y' =>
686 Warn_On_Ada_2005_Compatibility := False;
687 Warn_On_Ada_2012_Compatibility := False;
689 when 'z' =>
690 Warn_On_Unchecked_Conversion := True;
692 when 'Z' =>
693 Warn_On_Unchecked_Conversion := False;
695 when others =>
696 if Ignore_Unrecognized_VWY_Switches then
697 Write_Line ("unrecognized switch -gnatw" & C & " ignored");
698 else
699 return False;
700 end if;
701 return False;
702 end case;
704 return True;
705 end Set_Warning_Switch;
707 end Warnsw;