PR 30551 -pedantic does not include -Wmain, but -pedantic-errors does make -Wmain cause error messages

Manuel López-Ibáñez lopezibanez@gmail.com
Fri Aug 15 11:14:00 GMT 2008


Forgot the patch.

2008/8/15 Manuel López-Ibáñez <lopezibanez@gmail.com>:
> 2008/8/15 Andrew Pinski <pinskia@gmail.com>:
>> On Thu, Aug 14, 2008 at 4:49 PM, Manuel López-Ibáñez
>> <lopezibanez@gmail.com> wrote:
>>> 2008/8/14 Andrew Pinski <pinskia@gmail.com>:
>>>> On Wed, Aug 6, 2008 at 3:54 PM, Manuel López-Ibáñez
>>>> <lopezibanez@gmail.com> wrote:
>>>>> testsuite/
>>>>>  * doc/invoke.texi (Wmain): Update.
>>>>>  * gcc.dg/pr30551.c: New.
>>>>>  * gcc.dg/pr30551-2.c: New.
>>>>>  * gcc.dg/pr30551-3.c: New.
>>>>>  * gcc.dg/pr30551-4.c: New.
>>>>>  * gcc.dg/pr30551-5.c: New.
>>>>>  * gcc.dg/pr30551-6.c: New.
>>>>>  * gcc.dg/tree-ssa/reassoc-3.c: Don't compile with -pedantic-errors.
>>>>>  * g++.dg/warn/pr30551.C: New.
>>>>>  * g++.dg/warn/pr30551-2.C: New.
>>>>
>>>> All these testcases fail on spu-elf as -Wmain is off by default as
>>>> spu-elf's main is usually has different arguments than the "standard"
>>>> defined main.
>>>
>>> Also with -pedantic?
>>>
>>> pr30551-[45].c are testing -Wno-main. pr30551-2.c tests that it is
>>> disabled by default.
>>> Are they also failing? How? I don't have access to spu.
>>
>> The exact failures are:
>> +FAIL: gcc.dg/pr30551-3.c  (test for errors, line 5)
>> +FAIL: gcc.dg/pr30551-3.c  (test for errors, line 5)
>> +FAIL: gcc.dg/pr30551-3.c  (test for errors, line 5)
>> +FAIL: gcc.dg/pr30551-6.c  (test for warnings, line 5)
>> +FAIL: gcc.dg/pr30551-6.c  (test for warnings, line 5)
>> +FAIL: gcc.dg/pr30551-6.c  (test for warnings, line 5)
>> +FAIL: gcc.dg/pr30551.c  (test for warnings, line 5)
>> +FAIL: gcc.dg/pr30551.c  (test for warnings, line 5)
>> +FAIL: gcc.dg/pr30551.c  (test for warnings, line 5)
>> and:
>> +FAIL: g++.dg/warn/pr30551-2.C  (test for errors, line 5)
>> +FAIL: g++.dg/warn/pr30551-2.C  (test for errors, line 5)
>> +FAIL: g++.dg/warn/pr30551.C  (test for warnings, line 5)
>> +FAIL: g++.dg/warn/pr30551.C  (test for warnings, line 5)
>>
>> And yes even with -pedantic or -Wall, -Wmain is still disabled on spu-elf.
>>
>
>
> Could you test and commit the following patch?
>
> Thanks,
>
> Manuel.
>
> 2008-08-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org<
>
>  * gcc.dg/pr30551-6.c: Skip in SPU.
>  * gcc.dg/pr30551-3.c: Likewise.
>  * gcc.dg/pr30551.c: Likewise.
>  * g++.dg/warn/pr30551-2.C: Likewise.
>  * g++.dg/warn/pr30551.C: Likewise.
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-wmain-spu.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080815/69e11634/attachment.ksh>


More information about the Gcc-patches mailing list