Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CODAN question for function can not be resolved AND invalid arguments!

2010/9/10 Alena Laskavaia <elaskavaia.cdt@xxxxxxxxx>
My point is: It is VALID in C to have mismatch (yes without the
declaration) and it would even RUN.

Actually, you can only have the mismatch without the declaration. If the declaration is present in a given translation unit and the parameters don't match, then the translation unit won't compile.

On top of that, having the declaration is the most common case (and definitely good style of production code).

Now that we can agree that the notion of a "call parameter mismatch" exists and is well-defined in both C and C++ (even though it can be worked around in C as you're insisting), I'm implying that the C++ parser does generate problem bindings for this issue and the C parser does not. This is a fact, which leads to what I'm trying to say here: the parsers are not consistent in terms of handling mismatched parameters, which is misleading. That's it.


Back to the top