When compiling a file with a .cpp extension, it compiles by default as C ++ code. In C ++, the requirement for function declarations is a mandatory, stringent requirement. There is no point in creating the -Wmissing-prototypes option for C ++.
In other words, you cannot “enable this warning” in C ++ because the “missing prototype” is always an error in C ++.
PS As a note: the concept of a prototype is specific only to the C language. In C ++ there are no "prototypes".
In C, a function declaration may or may not be a prototype, so it is necessary that the additional term be different from others. In C ++, function declarations are always "prototypes" (from the point of view of C), so in C ++ there is simply no need for this additional member. In C ++ declarations, declarations are simply function declarations. It just says it all.
EDIT: After reading your comment, I came to the conclusion that you must have misunderstood the meaning and purpose of the -Wmissing-prototypes option and the corresponding warning. Please note: this option will not check if you have included prototypes of all your functions in any header file. There is no way in GCC to do this regardless of whether you use C or C ++.
The goal of -Wmissing-prototypes is different. This option only works when calling a function that does not have a visible prototype at the call point. In C, this is legal, but if you want to receive a warning in this case, you use the -Wmissing-prototypes option. In C ++, calling a function that does not have a visible declaration ("prototype") at the point of call is always a direct error, so C ++ compilers do not need an option like -Wmissing-prototypes .
In other words, if you defined some function in some implementation file, but forgot to include the prototype of this function in some header file, you will not receive any warnings from the compiler until you actually try to call this function. It doesn't matter if your code is C or C ++, whether you -Wmissing-prototypes or not ... Until you try to call the function, there will be no warnings.
But as soon as you try to call a function without a prototype, the C compiler will give a warning (if you used -Wmissing-prototypes ), and the C ++ compiler always reports an error.