This isn't specific to ERRCODE_WARNING_DEPRECATED_FEATURE; if you look at generate-plerrcodes.pl you'll see it only collects error codes, not warning codes, for use in plpgsql's mapping table. It's documented, too: Appendix A says
(Note that PL/pgSQL does not recognize warning, as opposed to error, condition names; those are classes 00, 01, and 02.)
Indeed.
next unless $type eq 'E';
The only exception is 'string_data_right_truncation' (01004) because actually it is duplicated further (22001).