Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903647

typedef of function pointers generates a redundant class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: