I can't find any thing about re declare function twice with different
arguments in the standard. So I think it's a non defined behavior.
Currently, what clang does is always pick the latest attribute it sees.

my change is to fix the case that one function has multiple format_arg
attribute

and your suggestion is essentially about check the behavior when people
define a function with different attribute (it doesn't have to be
format_arg, it could be any of the attributes)

Unless you could confirm current clang behavior is desired (always use the
latest declaration), I don't think it's good to write a test case for
non-defined behavior. Even we really want to do it, I want to do it in a
separate patch because people then could revert it separately.


On Mon, Sep 23, 2013 at 9:30 AM, Rafael Espíndola <
[email protected]> wrote:

> On 17 September 2013 17:04, Fuyao Zhao <[email protected]> wrote:
> > hi, it's just re-definition of the functions. I could look at where to
> add
> > the test case for this but it should not be in my this change.
>
> It is not obvious which of attributes is used (or if they are
> combined), so I think the test should be included in the patch.
>
> Cheers,
> Rafael
>



-- 
Fuyao
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to