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

            Bug ID: 88674
           Summary: GCC thinks that register is a qualifier in function
                    declaration with no parameters.
           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):

  void f(register void);

  int main()
  {   
  }

Compilation command line:

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

Observed behaviour:

  The following error message was outputed:

    prog.c:1:8: error: 'void' as only parameter may not be qualified
        1 | void f(register void);
          |        ^~~~~~~~~~~~~

Expected behaviour:

  No error message outputed.

  The program is valid.  register  is not a type qualifier.

Note:

  Clang accepts the program without outputing any error message.

Reply via email to