[Development] Compiler warnings

Smith Martin Martin.Smith at theqtcompany.com
Wed Oct 15 09:58:16 CEST 2014

From: development-bounces+martin.smith=theqtcompany.com at qt-project.org <development-bounces+martin.smith=theqtcompany.com at qt-project.org> on behalf of Poenitz Andre <Andre.Poenitz at theqtcompany.com>
Sent: Wednesday, October 15, 2014 9:48 AM
To: Kurt Pattyn; Bo Thorsen
Cc: development at qt-project.org
Subject: Re: [Development] Compiler warnings

Kurt Pattyn <pattyn.kurt at gmail.com> wrote:
> > On 14 Oct 2014, at 10:21, Bo Thorsen <bo at vikingsoft.eu> wrote:
> >
> > Den 14-10-2014 08:59, Kurt Pattyn skrev:
> >> how do these applications comply with MISRA?
> >
> > MISRA is impossible to comply with for a framework. For example,
> >  consider the required rule 0-1-11: "There shall be no unused parameters
> >  (named or unnamed) in non-virtual functions."
> >
> > With this, void f(int /*no_longer_used*/) is illegal. For any
> > non-trivial framework that keeps binary compatibility, this will over time be hit.
> On second thought, I think this is a very bad example. Even while you keep
>  binary compatibility, you break semantics here.
> This is typically a case where one should break binary compatibility.

Are you seriously asking for a new major Qt release just because a
new implementation of some function does not require some parameter

But maintaining binary compatibility is now a necessary facet of software engineering, so maybe it is time for the C++ standard to support it. A keyword could be added to the parameter declaration, "compatibility" or "placeholder" for example, could precede a parameter declaration that is kept for binary compatibility. The compiler would not warn that the parameter was not used.


Development mailing list
Development at qt-project.org

More information about the Development mailing list