From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,803df5f3f60558d5 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Uninitialized "out" parameters Date: 1996/07/23 Message-ID: #1/1 X-Deja-AN: 170178465 references: <4smh9i$gp5@krusty.irvine.com> <4ssn9r$p6e@mulga.cs.mu.OZ.AU> <4ste71$hg8@felix.seas.gwu.edu> <4svba5$j2i@mulga.cs.mu.OZ.AU> <4t3o3s$kt9@felix.seas.gwu.edu> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-07-23T00:00:00+00:00 List-Id: Mike said "Indeed. A compiler should give a warning, and in my experience, does, if it can make a reasonably good guess. Some compilers (I think) provide a compile-time flag that the programmer wants to treat warnings as though they were fatal errors. I don;t see anything in gnatinfo to suggest that GNAT does this, though." Mike, remember that GNAT is part of gcc, *all* the usual gcc options apply, as documented in the gcc manual. The following is from gnatinfo.txt: In the usual procedures for using GNAT, Ada source programs are compiled into object files using the driver program 'gcc' with the option '-c' (compile only). Gcc recognizes the ada filename extensions .ads and .adb (discussed more thoroughly below) and calls the actual compiler, 'gnat1' to compile the source file. Gcc has many switches explained in your gcc documentation. In addition, gcc passes certain switches to gnat1. These (with a couple of exceptional abbreviations) are spelled on the gcc command line by "-gnatXXX". In "your gcc documentation" you will find the switch -Wuninitialized, which, used together with -O, causes gcc to give warnings for uninitialized variables. The GNAT frontend also catches some cases itself.