On Tue, 19 May 2020 at 09:26, Jakub Jelinek via Gcc <g...@gcc.gnu.org> wrote:
>
> On Tue, May 19, 2020 at 10:11:28AM +0200, Martin Liška wrote:
> > > I find this format more helpful for the reasons below so unless your
> > > script can be tweaked to do something similar I'd like to be able to
> > > continue to use mine going forward with the new infrastructure.
> >
> > Let's extend the contrib script.
>
> BTW, concerning mklog, the very common problem is that it doesn't do the
> right thing because the patch doesn't contain enough context to figure out
> what exactly has changed.  If the script would be used together with git
> rather than just on a patch file, perhaps it could handle more, like
> ask git for a patch with unlimited context (like -U100000000 on patch does).
> The common problems I remember is that e.g. when changing a function comment
> above some function, it is attributed to the previous function rather than
> following, labels in function confusing it:
>  void
>  foo ()
>  {
>    ...
>  label:
>    ...
> -  ...
> +  ...
>  }
> will result in (label), GTY markers confusing it
>  struct GTY foobar {
>    ...
> -  ...
> +  ...
>  };
> resulting in (struct GTY) or so, another common problem is too large
> function names (or more often *.md define_* names); here I'm afraid
> diff doesn't have an argument to not truncate it, or sometimes e.g. changes
> to #define being attributed to something else.
> I know some of the issues can be pretty hard to deal with.

This isn't a complaint, because I don't expect them to work, but
mklog.py (and diff --show-c-function) are useless for libstdc++ code,
they can't handle namespaces and result in nonsense like:

--- a/libstdc++-v3/src/c++11/random.cc
+++ b/libstdc++-v3/src/c++11/random.cc
@@ -97,7 +97,7 @@ namespace std _GLIBCXX_VISIBILITY(default)

and

libstdc++-v3/ChangeLog:

        * src/c++11/random.cc (_GLIBCXX_VISIBILITY):
        * testsuite/26_numerics/random/random_device/94087.cc: New test.

Reply via email to