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

            Bug ID: 126484
           Summary: error: too few arguments to function ‘unsigned int
                    __builtin_mips_get_fcsr(void)`
           Product: gcc
           Version: 16.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc-bugzilla at geoff dot wozniak.ca
  Target Milestone: ---

Use of the builtin function __builtin_mips_get_fcsr with the C++ driver results
in the error that there are not enough arguments passed, but the function does
not take any arguments.

The builtin is documented here:

https://gcc.gnu.org/onlinedocs/gcc-16.1.0/gcc/Other-MIPS-Built-in-Functions.html

An example on Compiler Explorer: https://godbolt.org/z/joaeEMhvj

I have tried this on various builds of GCC and they all produce the same
result. Here is the oldest one I have, using a build from Codescape.

% cat t.cpp
unsigned int wrapper() {
    return __builtin_mips_get_fcsr ();
}

% mips-img-elf-g++ --version
mips-img-elf-g++ (Codescape GNU Tools 2016.05-01 for MIPS IMG Bare Metal) 4.9.2

% mips-img-elf-g++ -mhard-float -c t.cpp
t.cpp: In function ‘unsigned int wrapper()’:
t.cpp:2:35: error: too few arguments to function ‘unsigned int
__builtin_mips_get_fcsr(void)’
   return __builtin_mips_get_fcsr ();
                                   ^
<built-in>: note: declared here

Reply via email to