On Mai 08 2018, Florian Weimer wrote:
> I wonder if it's currently a warning because the implicit int is used in
> configure checks.
Is it? At least in the GCC sources I couldn't find any occurence of
main without a preceding int.
Andreas.
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key
On 8 May 2018 at 12:35, Florian Weimer wrote:
> On 04/25/2018 04:40 PM, Jonathan Wakely wrote:
>>
>> More concretely, deprecating it for a few releases would allow us to
>> apply the attached patch at some point in the future, so that instead
>> of:
>>
>> rt.c:1:6: warning: ISO C++ forbids declarat
On 04/25/2018 04:40 PM, Jonathan Wakely wrote:
More concretely, deprecating it for a few releases would allow us to
apply the attached patch at some point in the future, so that instead
of:
rt.c:1:6: warning: ISO C++ forbids declaration of ‘main’ with no type
[-Wreturn-type]
main() { return 0;
On 25/04/18 13:13 -0400, Nathan Sidwell wrote:
On 04/25/2018 12:45 PM, Jonathan Wakely wrote:
@@ -15869,6 +15851,12 @@ finish_function (bool inline_p)
{
warning (OPT_Wreturn_type,
"no return statement in function returning non-void");
+ if (DECL_NAME (fndecl) == ass
On 04/25/2018 12:45 PM, Jonathan Wakely wrote:
@@ -15869,6 +15851,12 @@ finish_function (bool inline_p)
{
warning (OPT_Wreturn_type,
"no return statement in function returning non-void");
+ if (DECL_NAME (fndecl) == assign_op_identifier)
IDENTIFIER_ASSIGN_OP_P (
On 25/04/18 12:22 -0400, David Malcolm wrote:
On Wed, 2018-04-25 at 16:54 +0100, Jonathan Wakely wrote:
On 25/04/18 16:30 +0100, Andrew Haley wrote:
> On 04/25/2018 03:04 PM, Jonathan Wakely wrote:
> > On 25/04/18 14:59 +0100, Andrew Haley wrote:
> > > On 04/25/2018 02:56 PM, Jason Merrill wrote
On Wed, 2018-04-25 at 16:54 +0100, Jonathan Wakely wrote:
> On 25/04/18 16:30 +0100, Andrew Haley wrote:
> > On 04/25/2018 03:04 PM, Jonathan Wakely wrote:
> > > On 25/04/18 14:59 +0100, Andrew Haley wrote:
> > > > On 04/25/2018 02:56 PM, Jason Merrill wrote:
> > > > > The warning by default seems
On 25/04/18 16:30 +0100, Andrew Haley wrote:
On 04/25/2018 03:04 PM, Jonathan Wakely wrote:
On 25/04/18 14:59 +0100, Andrew Haley wrote:
On 04/25/2018 02:56 PM, Jason Merrill wrote:
The warning by default seems sufficient to me.
Yes. We've been bitten by this a few times, with mysterious cr
On Wed, Apr 25, 2018 at 10:40 AM, Jonathan Wakely wrote:
> On 25/04/18 14:53 +0100, Andrew Haley wrote:
>>
>> On 04/25/2018 01:23 PM, Jonathan Wakely wrote:
>>
>>> We enabled -Wreturn-type by default in GCC 8, so code using the
>>> extension will get warnings even without -Wall now. Users might wa
On 04/25/2018 03:04 PM, Jonathan Wakely wrote:
> On 25/04/18 14:59 +0100, Andrew Haley wrote:
>> On 04/25/2018 02:56 PM, Jason Merrill wrote:
>>> The warning by default seems sufficient to me.
>>
>> Yes. We've been bitten by this a few times, with mysterious crashes.
>> I'm not sure it even makes
On 25/04/18 14:53 +0100, Andrew Haley wrote:
On 04/25/2018 01:23 PM, Jonathan Wakely wrote:
We enabled -Wreturn-type by default in GCC 8, so code using the
extension will get warnings even without -Wall now. Users might want
to use -Werror=return-type to ensure they aren't bitten by the new
opt
On 25/04/18 14:59 +0100, Andrew Haley wrote:
On 04/25/2018 02:56 PM, Jason Merrill wrote:
The warning by default seems sufficient to me.
Yes. We've been bitten by this a few times, with mysterious crashes.
I'm not sure it even makes sense only to be a warning, but I guess
that's up to the C++
On 04/25/2018 02:56 PM, Jason Merrill wrote:
> The warning by default seems sufficient to me.
Yes. We've been bitten by this a few times, with mysterious crashes.
I'm not sure it even makes sense only to be a warning, but I guess
that's up to the C++ TC.
--
Andrew Haley
Java Platform Lead Engin
On Wed, Apr 25, 2018 at 9:53 AM, Andrew Haley wrote:
> On 04/25/2018 01:23 PM, Jonathan Wakely wrote:
>
>> We enabled -Wreturn-type by default in GCC 8, so code using the
>> extension will get warnings even without -Wall now. Users might want
>> to use -Werror=return-type to ensure they aren't bit
On 04/25/2018 01:23 PM, Jonathan Wakely wrote:
> We enabled -Wreturn-type by default in GCC 8, so code using the
> extension will get warnings even without -Wall now. Users might want
> to use -Werror=return-type to ensure they aren't bitten by the new
> optimizations that assume control never rea
G++ allows the 'main' function to be declared without a return type:
$ gcc-8 -x c++ - <<< 'main() { }'
:1:6: warning: ISO C++ forbids declaration of ‘main’ with no type
[-Wreturn-type]
We enabled -Wreturn-type by default in GCC 8, so code using the
extension will get warnings even without -Wall
16 matches
Mail list logo