This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] move some warning to style check
- From: Laurent GUERBY <laurent at guerby dot net>
- To: Arnaud Charlet <charlet at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Robert Dewar <dewar at adacore dot com>
- Date: Fri, 19 Nov 2004 21:31:44 +0100
- Subject: Re: [Ada] move some warning to style check
- References: <20041119105026.GG18469@adacore.com>
The commit was probably incomplete, with HEAD I get:
gcc -c -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -gnatpg -gnata
-I- -I. -Iada -I/home/guerby/work/gcc/version-head/gcc/ada
/home/guerby/work/gcc/version-head/gcc/ada/stylesw.adb -o ada/stylesw.o
stylesw.adb:53:07: "Style_Check_Subprogram_Order" is undefined (more
references follow)
Hope this helps,
Laurent
On Fri, 2004-11-19 at 11:50, Arnaud Charlet wrote:
> Tested on x86-linux, committed on mainline.
>
> The warning for a C-style extra level of parentheses around conditionals
> is now a style warning (controlled by the -gnatyx switch, and included
> by default in -gnaty), rather than being a redundant construct warning.
> On reflection, this is really more of a style issue, and since this
> imported-from-C style is more common than it should be in Ada programs,
> it is useful to be able to control it separately from the other useful
> redundant construct warnings. While we are at it, the name of the flag for
> subprogram ordering is changed from Subprogram_Order to Order_Subprograms
> since this corresponds better to its alpha switch letter (which is o).
>
> 2004-11-18 Robert Dewar <dewar@adacore.com>
>
> * errout.ads, errout.adb: (First_Sloc): New function
>
> * par-ch5.adb (P_Condition): Check for redundant parens is now a style
> check (-gnatyx) instead of being included as a redundant construct
> warning.
>
> * sem_ch6.adb: Change name Style_Check_Subprogram_Order to
> Style_Check_Order_Subprograms.
>
> * style.ads, styleg.ads, styleg.adb, styleg-c.adb, stylesw.ads,
> stylesw.adb: Add Style_Check_Xtra_Parens
>
> * usage.adb: Add line for -gnatyx (check extra parens)
>
> * vms_data.ads: Add entry for STYLE_CHECKS=XTRA_PARENS => -gnatyx
>