typedef of function pointers generates a redundant class

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None

      Consider this code:

      typedef void (*f)(int, double);
      foo(f ptr);

      This generates two classes:

      * f (the function pointer typedef)
      * f$ptr (a copy of the function pointer class, seen from the parameter type of foo)

      The second class is redundant, and arguably wrong, as it seems to suggest that the function pointer has been defined "inline", as follows:

      void foo(void (*f)(int, double));

      Which is obviously not the case.

            Assignee:
            Maurizio Cimadamore
            Reporter:
            Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: