[C++ PATCH] Deprecate -ffriend-injection

Nathan Sidwell nathan@acm.org
Fri Feb 16 15:44:00 GMT 2018


This patch deprecates the -ffriend-injection option.
1) issue a deprecated warning, if the option is set.
2) if we do inject a visible friend, issue a warning.  This warning is 
not inhibitable, like the for-scope behaviour.  (Notice we never 
injected visible friend classes, only functions).
3) Update the 'backwards compatibility' section to mention this.

I noticed that at the point we warn about the flag, input_location is 
BUILTINS_LOCATION.  There isn't a known fixed location for 
<command-line> or <main-input-file>.  I think using UNKNOWN_LOCATION, 
which generates 'cc1plus: diag...', is less confusing than '<builtins>: 
diag...'.

'Now that there is a definitive ISO standard C++, G++ has a 
specification to adhere to.'

We now have several :)

nathan
-- 
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inject.diff
Type: text/x-patch
Size: 5644 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180216/6ec6e0f1/attachment.bin>


More information about the Gcc-patches mailing list