public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66934] New: Compiler accepting ill-formed program with extern variable declarations and using-declaration
@ 2015-07-19  1:54 anders.granlund.0 at gmail dot com
  2015-07-19 13:33 ` [Bug c++/66934] " redi at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: anders.granlund.0 at gmail dot com @ 2015-07-19  1:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66934
           Summary: Compiler accepting ill-formed program with extern
                    variable declarations and using-declaration
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anders.granlund.0 at gmail dot com
  Target Milestone: ---

The following program is ill-formed since the two declarations in main are
conflicting.

  namespace N {
      extern int x;
  }

  int main() {
      using N::x;
      extern int x;
  }

GCC compiles with program without errors. The expected behaviour is to get a
compiler error.


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

end of thread, other threads:[~2021-12-09  9:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-19  1:54 [Bug c++/66934] New: Compiler accepting ill-formed program with extern variable declarations and using-declaration anders.granlund.0 at gmail dot com
2015-07-19 13:33 ` [Bug c++/66934] " redi at gcc dot gnu.org
2015-07-19 21:42 ` anders.granlund.0 at gmail dot com
2015-07-19 22:53 ` redi at gcc dot gnu.org
2015-07-27  1:15 ` anders.granlund.0 at gmail dot com
2015-07-27  1:16 ` anders.granlund.0 at gmail dot com
2015-07-27  1:18 ` anders.granlund.0 at gmail dot com
2015-07-27  1:38 ` anders.granlund.0 at gmail dot com
2021-12-03  0:45 ` pinskia at gcc dot gnu.org
2021-12-03  0:46 ` pinskia at gcc dot gnu.org
2021-12-03  0:55 ` pinskia at gcc dot gnu.org
2021-12-09  9:18 ` marxin 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).