(Google does not requires me to write this report, yet I would like to
bring some attention to the project, hoping that patches are reviewed
and open issues are discussed.)

The following is the final report on my Google's Summer of Code
project. It summarises what we have achieved so far, which is pretty
much all that was intended, and what remains to be done.

A clear separation has been made between the original purpose of
Wconversion, which has been encapsulated in a new option
Wtraditional-conversion, and the purpose of the new Wcoercion option,
which is to warn for implicit conversions that may alter a value. The
names of these new options are provisional until an agreement on the
final options names is reached. A more detailed explanation of each
option and the motivation behind these changes can be found in the
Wcoercion project wiki page. [1]

Conversions examined are real from/to integer, signed from/to
unsigned, and conversions to smaller width types. In this context,
real includes both binary and decimal float. Binary float from/to
decimal float conversions are also taken into account by Wcoercion.
The code works for both C and C++ (and probably would work also for
obj-c and obj-c++, although I don't know whether that is appropriate).
Testcases can be found at the project's page [2].

Existing code has been reused as much as possible by assessing whether
its intended behaviour falls into the description of
Wtraditional-conversion or Wcoercion. For example, Wconversion warning
messages in g++ are now triggered by Wcoercion instead. However, we
have modified the old behaviour where it was appropriate. For
instance, g++ no longer warns for int i = 1.0 as Wconversion did,
since no value is changed in such conversion.  A second example is
that Wtraditional-conversion no longer warns for decimal float, since
there are no default promotions for decimal float, so the default
promotion could never make a difference whenever the value passed as
argument or the expected type is a decimal float type. [3]

Five patches are currently in the queue list pending review. An
imminent additional patch will add support for decimal floats. Yet, an
open and fundamental issue is the final name for each option. Once a
decision is made, patches would need to be adjusted accordingly. Also,
additional patches may rename all mentions of Wconversion in the GCC
code to the final name. In the next days I will add the Wcoercion
project to the GCC 4.3 Project's page.[4]

Finally, I would like to acknowledge my mentor Ian Lance Taylor. His
patience and helpful comments have been an important motivation to
keep working in the project.[*] Also, thanks to Roger Sayle and Janis
Johnson for their ideas, comments and help with some parts of the
code.

Manuel López-Ibáñez,

[1] http://gcc.gnu.org/wiki/Wcoercion#Background
[2] http://gcc.gnu.org/wiki/Wcoercion#Testcases
[3] http://gcc.gnu.org/ml/gcc/2006-08/msg00230.html
[4] http://gcc.gnu.org/wiki/GCC_4.3_Release_Planning

[*] For your information, the final evaluation has already finished.

Reply via email to