Re: F40 proposal: Porting Fedora to Modern C (System-Wide Change proposal)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Jakub Jelinek:

> -Werror=implicit -Werror=implicit-function-declaration -Werror=old-style-definition
> will reject these even now.  Though, I think -Wold-style-definition warns
> even about the no argument case which in C2X is the same as in C++ - ()
> being equivalent to (void).

In particular, you can continue to write declarations like this one,

  char foo ();

even though -Werror=strict-prototypes rejects such declarations.  What
will stop working is calling foo ("ignored") because () is no am empty
parameter list, not an unspecified parameter list.  (-Wstrict-prototypes
will become irrelevant because there won't be any functions without
prototypes.)

It is really impossible to test this with -Werror=strict-prototypes
because the “char foo ();” construct is widely used in configure checks,
and will continue to work with the default language mode.

Thanks,
Florian
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux