https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88774

            Bug ID: 88774
           Summary: Qualification of parameters does not change a function
                    type: Bug or standard defect?
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anders.granlund.0 at gmail dot com
  Target Milestone: ---

Test case (prog.c):

  int main(void)
  {
    typedef void f(int);
    typedef void f(const int);
  }

Compilation command line:

  gcc prog.c -Wall -Wextra -std=c11 -pedantic-errors 

Observed behaviour:

  No error messages outputed.

Question:

  The function types in the two typedefs are compatible, but are they distinct?

  The standard is not very clear on this.

  If the two function types are distinct the expected behaviour is to get an 
  error message about redeclaring the typedef name  f  with a different type.

  Else the observed behaviour is expected and there is no bug.

Reply via email to