This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING^3] Wconversion: fixes for C++ front-end


On 08 Feb 2007 05:58:54 -0600, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
"Manuel López-Ibáñez" <lopezibanez@gmail.com> writes:

[...]

| Another problem is that I would need to encapsulate the warning logic
| in convert_and_check on its own function, so it can be called from
| convert_and_check and ocp_convert. That is fine except for the fact
| that the C++ front-end already uses convert_and_check in a few places,
| which in turn calls convert, which in turn calls ocp_convert, that
| would generate warnings again. How could we fix this situation?

Make a list of all the places where the C++ front-end calls
convert_and_check, document why.

:-( I can prepare that list. It is short:


* call.c (convert_like_real)
* typeck.c (build_ptrmemfunc1)
* c-common.c (c_add_case_label)

However, I cannot know why the C++ front-end calls convert_and_check
(apart from the obvious reason of getting warnings for conversions).

Make a list of all the places where the C++ front-end does not call
convert_and_check (that is already contained in your patch).

I don't understand this. Do you mean the places where the C++ front-end calls a conversion function instead of convert_and_check ? (and which ones? convert, cp_convert, ...). There are around 66 calls to convert and 52 calls to cp_convert. :-(

Manuel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]