public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97890] New: Abstract virtual classes suddenly allowed as parameter types ?
@ 2020-11-18 10:10 dcb314 at hotmail dot com
  2020-11-18 10:41 ` [Bug c++/97890] " dcb314 at hotmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dcb314 at hotmail dot com @ 2020-11-18 10:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97890
           Summary: Abstract virtual classes suddenly allowed as parameter
                    types ?
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this wrong C++ code:

struct S        // abstract
{
        int b;

        virtual void f() = 0;
};

extern void g( struct S);

Suddenly seems to have started working sometime between 20201114
and 20201116.

/home/dcb/gcc/results.20201114/bin/gcc
nov18b.cc:9:24: error: cannot declare parameter to be of abstract type ‘S’
    9 | extern void g( struct S);
      |                        ^
nov18b.cc:2:8: note:   because the following virtual functions are pure within
‘S’:
    2 | struct S        // abstract
      |        ^
nov18b.cc:6:22: note:     ‘virtual void S::f()’
    6 |         virtual void f() = 0;
      |                      ^
/home/dcb/gcc/results.20201116.valgrind/bin/gcc

Compiler dated 20201104 has git hash 8270a7238ba1b535
and compiler dated 20201116 has git hash 2f473f4b065d3cc0.

Accident or design ?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-17  5:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 10:10 [Bug c++/97890] New: Abstract virtual classes suddenly allowed as parameter types ? dcb314 at hotmail dot com
2020-11-18 10:41 ` [Bug c++/97890] " dcb314 at hotmail dot com
2020-11-18 11:29 ` dcb314 at hotmail dot com
2020-11-18 11:57 ` dcb314 at hotmail dot com
2020-11-18 12:19 ` dcb314 at hotmail dot com
2020-11-18 12:44 ` redi at gcc dot gnu.org
2021-08-17  5:30 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).