PR target/58115
[official-gcc.git] / gcc / ada / warnsw.adb
blob009b450784c52eb544e822a7cf54505abecaa483
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 Implementation_Unit_Warnings :=
51 W.Implementation_Unit_Warnings;
52 Ineffective_Inline_Warnings :=
53 W.Ineffective_Inline_Warnings;
54 List_Body_Required_Info :=
55 W.List_Body_Required_Info;
56 List_Inherited_Aspects :=
57 W.List_Inherited_Aspects;
58 Warning_Doc_Switch :=
59 W.Warning_Doc_Switch;
60 Warn_On_Ada_2005_Compatibility :=
61 W.Warn_On_Ada_2005_Compatibility;
62 Warn_On_Ada_2012_Compatibility :=
63 W.Warn_On_Ada_2012_Compatibility;
64 Warn_On_All_Unread_Out_Parameters :=
65 W.Warn_On_All_Unread_Out_Parameters;
66 Warn_On_Assertion_Failure :=
67 W.Warn_On_Assertion_Failure;
68 Warn_On_Assumed_Low_Bound :=
69 W.Warn_On_Assumed_Low_Bound;
70 Warn_On_Atomic_Synchronization :=
71 W.Warn_On_Atomic_Synchronization;
72 Warn_On_Bad_Fixed_Value :=
73 W.Warn_On_Bad_Fixed_Value;
74 Warn_On_Biased_Representation :=
75 W.Warn_On_Biased_Representation;
76 Warn_On_Constant :=
77 W.Warn_On_Constant;
78 Warn_On_Deleted_Code :=
79 W.Warn_On_Deleted_Code;
80 Warn_On_Dereference :=
81 W.Warn_On_Dereference;
82 Warn_On_Export_Import :=
83 W.Warn_On_Export_Import;
84 Warn_On_Hiding :=
85 W.Warn_On_Hiding;
86 Warn_On_Modified_Unread :=
87 W.Warn_On_Modified_Unread;
88 Warn_On_No_Value_Assigned :=
89 W.Warn_On_No_Value_Assigned;
90 Warn_On_Non_Local_Exception :=
91 W.Warn_On_Non_Local_Exception;
92 Warn_On_Object_Renames_Function :=
93 W.Warn_On_Object_Renames_Function;
94 Warn_On_Obsolescent_Feature :=
95 W.Warn_On_Obsolescent_Feature;
96 Warn_On_Overlap :=
97 W.Warn_On_Overlap;
98 Warn_On_Overridden_Size :=
99 W.Warn_On_Overridden_Size;
100 Warn_On_Parameter_Order :=
101 W.Warn_On_Parameter_Order;
102 Warn_On_Questionable_Missing_Parens :=
103 W.Warn_On_Questionable_Missing_Parens;
104 Warn_On_Record_Holes :=
105 W.Warn_On_Record_Holes;
106 Warn_On_Redundant_Constructs :=
107 W.Warn_On_Redundant_Constructs;
108 Warn_On_Reverse_Bit_Order :=
109 W.Warn_On_Reverse_Bit_Order;
110 Warn_On_Standard_Redefinition :=
111 W.Warn_On_Standard_Redefinition;
112 Warn_On_Suspicious_Contract :=
113 W.Warn_On_Suspicious_Contract;
114 Warn_On_Unchecked_Conversion :=
115 W.Warn_On_Unchecked_Conversion;
116 Warn_On_Unordered_Enumeration_Type :=
117 W.Warn_On_Unordered_Enumeration_Type;
118 Warn_On_Unrecognized_Pragma :=
119 W.Warn_On_Unrecognized_Pragma;
120 Warn_On_Unrepped_Components :=
121 W.Warn_On_Unrepped_Components;
122 Warn_On_Warnings_Off :=
123 W.Warn_On_Warnings_Off;
124 end Restore_Warnings;
126 -------------------
127 -- Save_Warnings --
128 -------------------
130 function Save_Warnings return Warning_Record is
131 W : Warning_Record;
133 begin
134 W.Address_Clause_Overlay_Warnings :=
135 Address_Clause_Overlay_Warnings;
136 W.Check_Unreferenced :=
137 Check_Unreferenced;
138 W.Check_Unreferenced_Formals :=
139 Check_Unreferenced_Formals;
140 W.Check_Withs :=
141 Check_Withs;
142 W.Constant_Condition_Warnings :=
143 Constant_Condition_Warnings;
144 W.Elab_Warnings :=
145 Elab_Warnings;
146 W.Implementation_Unit_Warnings :=
147 Implementation_Unit_Warnings;
148 W.Ineffective_Inline_Warnings :=
149 Ineffective_Inline_Warnings;
150 W.List_Body_Required_Info :=
151 List_Body_Required_Info;
152 W.List_Inherited_Aspects :=
153 List_Inherited_Aspects;
154 W.Warning_Doc_Switch :=
155 Warning_Doc_Switch;
156 W.Warn_On_Ada_2005_Compatibility :=
157 Warn_On_Ada_2005_Compatibility;
158 W.Warn_On_Ada_2012_Compatibility :=
159 Warn_On_Ada_2012_Compatibility;
160 W.Warn_On_All_Unread_Out_Parameters :=
161 Warn_On_All_Unread_Out_Parameters;
162 W.Warn_On_Assertion_Failure :=
163 Warn_On_Assertion_Failure;
164 W.Warn_On_Assumed_Low_Bound :=
165 Warn_On_Assumed_Low_Bound;
166 W.Warn_On_Atomic_Synchronization :=
167 Warn_On_Atomic_Synchronization;
168 W.Warn_On_Bad_Fixed_Value :=
169 Warn_On_Bad_Fixed_Value;
170 W.Warn_On_Biased_Representation :=
171 Warn_On_Biased_Representation;
172 W.Warn_On_Constant :=
173 Warn_On_Constant;
174 W.Warn_On_Deleted_Code :=
175 Warn_On_Deleted_Code;
176 W.Warn_On_Dereference :=
177 Warn_On_Dereference;
178 W.Warn_On_Export_Import :=
179 Warn_On_Export_Import;
180 W.Warn_On_Hiding :=
181 Warn_On_Hiding;
182 W.Warn_On_Modified_Unread :=
183 Warn_On_Modified_Unread;
184 W.Warn_On_No_Value_Assigned :=
185 Warn_On_No_Value_Assigned;
186 W.Warn_On_Non_Local_Exception :=
187 Warn_On_Non_Local_Exception;
188 W.Warn_On_Object_Renames_Function :=
189 Warn_On_Object_Renames_Function;
190 W.Warn_On_Obsolescent_Feature :=
191 Warn_On_Obsolescent_Feature;
192 W.Warn_On_Overlap :=
193 Warn_On_Overlap;
194 W.Warn_On_Overridden_Size :=
195 Warn_On_Overridden_Size;
196 W.Warn_On_Parameter_Order :=
197 Warn_On_Parameter_Order;
198 W.Warn_On_Questionable_Missing_Parens :=
199 Warn_On_Questionable_Missing_Parens;
200 W.Warn_On_Record_Holes :=
201 Warn_On_Record_Holes;
202 W.Warn_On_Redundant_Constructs :=
203 Warn_On_Redundant_Constructs;
204 W.Warn_On_Reverse_Bit_Order :=
205 Warn_On_Reverse_Bit_Order;
206 W.Warn_On_Standard_Redefinition :=
207 Warn_On_Standard_Redefinition;
208 W.Warn_On_Suspicious_Contract :=
209 Warn_On_Suspicious_Contract;
210 W.Warn_On_Unchecked_Conversion :=
211 Warn_On_Unchecked_Conversion;
212 W.Warn_On_Unordered_Enumeration_Type :=
213 Warn_On_Unordered_Enumeration_Type;
214 W.Warn_On_Unrecognized_Pragma :=
215 Warn_On_Unrecognized_Pragma;
216 W.Warn_On_Unrepped_Components :=
217 Warn_On_Unrepped_Components;
218 W.Warn_On_Warnings_Off :=
219 Warn_On_Warnings_Off;
221 return W;
222 end Save_Warnings;
224 ----------------------------
225 -- Set_Dot_Warning_Switch --
226 ----------------------------
228 function Set_Dot_Warning_Switch (C : Character) return Boolean is
229 begin
230 case C is
231 when 'a' =>
232 Warn_On_Assertion_Failure := True;
234 when 'A' =>
235 Warn_On_Assertion_Failure := False;
237 when 'b' =>
238 Warn_On_Biased_Representation := True;
240 when 'B' =>
241 Warn_On_Biased_Representation := False;
243 when 'c' =>
244 Warn_On_Unrepped_Components := True;
246 when 'C' =>
247 Warn_On_Unrepped_Components := False;
249 when 'd' =>
250 Warning_Doc_Switch := True;
252 when 'D' =>
253 Warning_Doc_Switch := False;
255 when 'e' =>
256 Address_Clause_Overlay_Warnings := True;
257 Check_Unreferenced := True;
258 Check_Unreferenced_Formals := True;
259 Check_Withs := True;
260 Constant_Condition_Warnings := True;
261 Elab_Warnings := True;
262 Implementation_Unit_Warnings := True;
263 Ineffective_Inline_Warnings := True;
264 List_Body_Required_Info := True;
265 List_Inherited_Aspects := True;
266 Warning_Doc_Switch := True;
267 Warn_On_Ada_2005_Compatibility := True;
268 Warn_On_Ada_2012_Compatibility := True;
269 Warn_On_All_Unread_Out_Parameters := True;
270 Warn_On_Assertion_Failure := True;
271 Warn_On_Assumed_Low_Bound := True;
272 Warn_On_Atomic_Synchronization := True;
273 Warn_On_Bad_Fixed_Value := True;
274 Warn_On_Biased_Representation := True;
275 Warn_On_Constant := True;
276 Warn_On_Deleted_Code := True;
277 Warn_On_Dereference := True;
278 Warn_On_Export_Import := True;
279 Warn_On_Hiding := True;
280 Warn_On_Modified_Unread := True;
281 Warn_On_No_Value_Assigned := True;
282 Warn_On_Non_Local_Exception := True;
283 Warn_On_Object_Renames_Function := True;
284 Warn_On_Obsolescent_Feature := True;
285 Warn_On_Overlap := True;
286 Warn_On_Overridden_Size := True;
287 Warn_On_Parameter_Order := True;
288 Warn_On_Questionable_Missing_Parens := True;
289 Warn_On_Record_Holes := True;
290 Warn_On_Redundant_Constructs := True;
291 Warn_On_Reverse_Bit_Order := True;
292 Warn_On_Standard_Redefinition := True;
293 Warn_On_Suspicious_Contract := True;
294 Warn_On_Unchecked_Conversion := True;
295 Warn_On_Unordered_Enumeration_Type := True;
296 Warn_On_Unrecognized_Pragma := True;
297 Warn_On_Unrepped_Components := True;
298 Warn_On_Warnings_Off := True;
300 when 'g' =>
301 Set_GNAT_Mode_Warnings;
303 when 'h' =>
304 Warn_On_Record_Holes := True;
306 when 'H' =>
307 Warn_On_Record_Holes := False;
309 when 'i' =>
310 Warn_On_Overlap := True;
312 when 'I' =>
313 Warn_On_Overlap := False;
315 when 'k' =>
316 Warn_On_Standard_Redefinition := True;
318 when 'K' =>
319 Warn_On_Standard_Redefinition := False;
321 when 'l' =>
322 List_Inherited_Aspects := True;
324 when 'L' =>
325 List_Inherited_Aspects := False;
327 when 'm' =>
328 Warn_On_Suspicious_Modulus_Value := True;
330 when 'M' =>
331 Warn_On_Suspicious_Modulus_Value := False;
333 when 'n' =>
334 Warn_On_Atomic_Synchronization := True;
336 when 'N' =>
337 Warn_On_Atomic_Synchronization := False;
339 when 'o' =>
340 Warn_On_All_Unread_Out_Parameters := True;
342 when 'O' =>
343 Warn_On_All_Unread_Out_Parameters := False;
345 when 'p' =>
346 Warn_On_Parameter_Order := True;
348 when 'P' =>
349 Warn_On_Parameter_Order := False;
351 when 'r' =>
352 Warn_On_Object_Renames_Function := True;
354 when 'R' =>
355 Warn_On_Object_Renames_Function := False;
357 when 's' =>
358 Warn_On_Overridden_Size := True;
360 when 'S' =>
361 Warn_On_Overridden_Size := False;
363 when 't' =>
364 Warn_On_Suspicious_Contract := True;
366 when 'T' =>
367 Warn_On_Suspicious_Contract := False;
369 when 'u' =>
370 Warn_On_Unordered_Enumeration_Type := True;
372 when 'U' =>
373 Warn_On_Unordered_Enumeration_Type := False;
375 when 'v' =>
376 Warn_On_Reverse_Bit_Order := True;
378 when 'V' =>
379 Warn_On_Reverse_Bit_Order := False;
381 when 'w' =>
382 Warn_On_Warnings_Off := True;
384 when 'W' =>
385 Warn_On_Warnings_Off := False;
387 when 'x' =>
388 Warn_On_Non_Local_Exception := True;
390 when 'X' =>
391 Warn_On_Non_Local_Exception := False;
392 No_Warn_On_Non_Local_Exception := True;
394 when 'y' =>
395 List_Body_Required_Info := True;
397 when 'Y' =>
398 List_Body_Required_Info := False;
400 when others =>
401 if Ignore_Unrecognized_VWY_Switches then
402 Write_Line ("unrecognized switch -gnatw." & C & " ignored");
403 else
404 return False;
405 end if;
406 end case;
408 return True;
409 end Set_Dot_Warning_Switch;
411 ----------------------------
412 -- Set_GNAT_Mode_Warnings --
413 ----------------------------
415 procedure Set_GNAT_Mode_Warnings is
416 begin
417 Address_Clause_Overlay_Warnings := True;
418 Check_Unreferenced := True;
419 Check_Unreferenced_Formals := True;
420 Check_Withs := True;
421 Constant_Condition_Warnings := True;
422 Elab_Warnings := False;
423 Implementation_Unit_Warnings := False;
424 Ineffective_Inline_Warnings := True;
425 List_Body_Required_Info := False;
426 List_Inherited_Aspects := False;
427 Warning_Doc_Switch := False;
428 Warn_On_Ada_2005_Compatibility := True;
429 Warn_On_Ada_2012_Compatibility := True;
430 Warn_On_All_Unread_Out_Parameters := False;
431 Warn_On_Assertion_Failure := True;
432 Warn_On_Assumed_Low_Bound := True;
433 Warn_On_Atomic_Synchronization := False;
434 Warn_On_Bad_Fixed_Value := True;
435 Warn_On_Biased_Representation := True;
436 Warn_On_Constant := True;
437 Warn_On_Deleted_Code := False;
438 Warn_On_Dereference := False;
439 Warn_On_Export_Import := True;
440 Warn_On_Hiding := False;
441 Warn_On_Modified_Unread := True;
442 Warn_On_No_Value_Assigned := True;
443 Warn_On_Non_Local_Exception := False;
444 Warn_On_Object_Renames_Function := True;
445 Warn_On_Obsolescent_Feature := True;
446 Warn_On_Overlap := True;
447 Warn_On_Overridden_Size := True;
448 Warn_On_Parameter_Order := True;
449 Warn_On_Questionable_Missing_Parens := True;
450 Warn_On_Record_Holes := False;
451 Warn_On_Redundant_Constructs := True;
452 Warn_On_Reverse_Bit_Order := False;
453 Warn_On_Suspicious_Contract := True;
454 Warn_On_Unchecked_Conversion := True;
455 Warn_On_Unordered_Enumeration_Type := False;
456 Warn_On_Unrecognized_Pragma := True;
457 Warn_On_Unrepped_Components := False;
458 Warn_On_Warnings_Off := False;
459 end Set_GNAT_Mode_Warnings;
461 ------------------------
462 -- Set_Warning_Switch --
463 ------------------------
465 function Set_Warning_Switch (C : Character) return Boolean is
466 begin
467 case C is
468 when 'a' =>
469 Check_Unreferenced := True;
470 Check_Unreferenced_Formals := True;
471 Check_Withs := True;
472 Constant_Condition_Warnings := True;
473 Implementation_Unit_Warnings := True;
474 Ineffective_Inline_Warnings := True;
475 Warn_On_Ada_2005_Compatibility := True;
476 Warn_On_Ada_2012_Compatibility := True;
477 Warn_On_Assertion_Failure := True;
478 Warn_On_Assumed_Low_Bound := True;
479 Warn_On_Bad_Fixed_Value := True;
480 Warn_On_Biased_Representation := True;
481 Warn_On_Constant := True;
482 Warn_On_Export_Import := True;
483 Warn_On_Modified_Unread := True;
484 Warn_On_No_Value_Assigned := True;
485 Warn_On_Non_Local_Exception := True;
486 Warn_On_Object_Renames_Function := True;
487 Warn_On_Obsolescent_Feature := True;
488 Warn_On_Overlap := True;
489 Warn_On_Parameter_Order := True;
490 Warn_On_Questionable_Missing_Parens := True;
491 Warn_On_Redundant_Constructs := True;
492 Warn_On_Reverse_Bit_Order := True;
493 Warn_On_Suspicious_Contract := True;
494 Warn_On_Unchecked_Conversion := True;
495 Warn_On_Unrecognized_Pragma := True;
496 Warn_On_Unrepped_Components := True;
498 when 'A' =>
499 Address_Clause_Overlay_Warnings := False;
500 Check_Unreferenced := False;
501 Check_Unreferenced_Formals := False;
502 Check_Withs := False;
503 Constant_Condition_Warnings := False;
504 Elab_Warnings := False;
505 Implementation_Unit_Warnings := False;
506 Ineffective_Inline_Warnings := False;
507 List_Body_Required_Info := False;
508 List_Inherited_Aspects := False;
509 Warning_Doc_Switch := False;
510 Warn_On_Ada_2005_Compatibility := False;
511 Warn_On_Ada_2012_Compatibility := False;
512 Warn_On_All_Unread_Out_Parameters := False;
513 Warn_On_Assertion_Failure := False;
514 Warn_On_Assumed_Low_Bound := False;
515 Warn_On_Bad_Fixed_Value := False;
516 Warn_On_Biased_Representation := False;
517 Warn_On_Constant := False;
518 Warn_On_Deleted_Code := False;
519 Warn_On_Dereference := False;
520 Warn_On_Export_Import := False;
521 Warn_On_Hiding := False;
522 Warn_On_Modified_Unread := False;
523 Warn_On_No_Value_Assigned := False;
524 Warn_On_Non_Local_Exception := False;
525 Warn_On_Object_Renames_Function := False;
526 Warn_On_Obsolescent_Feature := False;
527 Warn_On_Overlap := False;
528 Warn_On_Overridden_Size := False;
529 Warn_On_Parameter_Order := False;
530 Warn_On_Record_Holes := False;
531 Warn_On_Questionable_Missing_Parens := False;
532 Warn_On_Redundant_Constructs := False;
533 Warn_On_Reverse_Bit_Order := False;
534 Warn_On_Standard_Redefinition := False;
535 Warn_On_Suspicious_Contract := False;
536 Warn_On_Suspicious_Modulus_Value := False;
537 Warn_On_Unchecked_Conversion := False;
538 Warn_On_Unordered_Enumeration_Type := False;
539 Warn_On_Unrecognized_Pragma := False;
540 Warn_On_Unrepped_Components := False;
541 Warn_On_Warnings_Off := False;
543 No_Warn_On_Non_Local_Exception := True;
545 when 'b' =>
546 Warn_On_Bad_Fixed_Value := True;
548 when 'B' =>
549 Warn_On_Bad_Fixed_Value := False;
551 when 'c' =>
552 Constant_Condition_Warnings := True;
554 when 'C' =>
555 Constant_Condition_Warnings := False;
557 when 'd' =>
558 Warn_On_Dereference := True;
560 when 'D' =>
561 Warn_On_Dereference := False;
563 when 'e' =>
564 Warning_Mode := Treat_As_Error;
566 when 'f' =>
567 Check_Unreferenced_Formals := True;
569 when 'F' =>
570 Check_Unreferenced_Formals := False;
572 when 'g' =>
573 Warn_On_Unrecognized_Pragma := True;
575 when 'G' =>
576 Warn_On_Unrecognized_Pragma := False;
578 when 'h' =>
579 Warn_On_Hiding := True;
581 when 'H' =>
582 Warn_On_Hiding := False;
584 when 'i' =>
585 Implementation_Unit_Warnings := True;
587 when 'I' =>
588 Implementation_Unit_Warnings := False;
590 when 'j' =>
591 Warn_On_Obsolescent_Feature := True;
593 when 'J' =>
594 Warn_On_Obsolescent_Feature := False;
596 when 'k' =>
597 Warn_On_Constant := True;
599 when 'K' =>
600 Warn_On_Constant := False;
602 when 'l' =>
603 Elab_Warnings := True;
605 when 'L' =>
606 Elab_Warnings := False;
608 when 'm' =>
609 Warn_On_Modified_Unread := True;
611 when 'M' =>
612 Warn_On_Modified_Unread := False;
614 when 'n' =>
615 Warning_Mode := Normal;
617 when 'o' =>
618 Address_Clause_Overlay_Warnings := True;
620 when 'O' =>
621 Address_Clause_Overlay_Warnings := False;
623 when 'p' =>
624 Ineffective_Inline_Warnings := True;
626 when 'P' =>
627 Ineffective_Inline_Warnings := False;
629 when 'q' =>
630 Warn_On_Questionable_Missing_Parens := True;
632 when 'Q' =>
633 Warn_On_Questionable_Missing_Parens := False;
635 when 'r' =>
636 Warn_On_Redundant_Constructs := True;
638 when 'R' =>
639 Warn_On_Redundant_Constructs := False;
641 when 's' =>
642 Warning_Mode := Suppress;
644 when 't' =>
645 Warn_On_Deleted_Code := True;
647 when 'T' =>
648 Warn_On_Deleted_Code := False;
650 when 'u' =>
651 Check_Unreferenced := True;
652 Check_Withs := True;
653 Check_Unreferenced_Formals := True;
655 when 'U' =>
656 Check_Unreferenced := False;
657 Check_Withs := False;
658 Check_Unreferenced_Formals := False;
660 when 'v' =>
661 Warn_On_No_Value_Assigned := True;
663 when 'V' =>
664 Warn_On_No_Value_Assigned := False;
666 when 'w' =>
667 Warn_On_Assumed_Low_Bound := True;
669 when 'W' =>
670 Warn_On_Assumed_Low_Bound := False;
672 when 'x' =>
673 Warn_On_Export_Import := True;
675 when 'X' =>
676 Warn_On_Export_Import := False;
678 when 'y' =>
679 Warn_On_Ada_2005_Compatibility := True;
680 Warn_On_Ada_2012_Compatibility := True;
682 when 'Y' =>
683 Warn_On_Ada_2005_Compatibility := False;
684 Warn_On_Ada_2012_Compatibility := False;
686 when 'z' =>
687 Warn_On_Unchecked_Conversion := True;
689 when 'Z' =>
690 Warn_On_Unchecked_Conversion := False;
692 when others =>
693 if Ignore_Unrecognized_VWY_Switches then
694 Write_Line ("unrecognized switch -gnatw" & C & " ignored");
695 else
696 return False;
697 end if;
698 return False;
699 end case;
701 return True;
702 end Set_Warning_Switch;
704 end Warnsw;