bfin c++ problem

Jonathan Wakely
Thu Jul 21 14:18:00 GMT 2016

On 21 July 2016 at 13:37, Oliver Kullmann <> wrote:
>> The old wording you're looking at was modified by
> There it says
>   All implementations shall allow both
>   function of () returning int and ...
>   as the type of main.
> That is rather unclear, unfortunately.
> The question is what "the type" means.

The type of the function. It's entirely clear, give up.

> As far as I am aware, 8.3.5 only *mentions* the "equivalence of types",
> but does not say where this is applicable.

int main(void) and int main() declare the same function. It has the
same type, because it's the same function.

> And in any case, for that to work, the option "std=c++14" had to be
> used, or?

No, for several reasons including that G++ applies DRs retroactively
and G++ has **always** accepted int main(void) as a valid definition
for main.

But in any case the OP is using GCC 6, so the default is -std=gnu++14.

Seriously, why are you still banging on about this?

> Anyway, just removing the "void" seems to me the clearest solution.

But doesn't fix the OP's problem and is totally irrelevant.

> And according to
>   C++ Standard Core Language Defect Reports and Accepted Issues,
>   Revision 96
>   Issues with DR, accepted, DRWP, and WP status are NOT part of the
>   International Standard for C++.
> Don't know about "CD3", but it appears that is still not "in", or?

Irrelevant, the modified wording is part of C++14, which is the only
C++ standard that is still an ISO standard.

Is there any need for this continued pedantry?  The OP's code is valid.

Give it a rest.

More information about the Gcc-help mailing list