public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66935] New: Compiler rejects well-formed program with local extern variable declaration and using-declaration
@ 2015-07-19  2:05 anders.granlund.0 at gmail dot com
  2015-07-27  1:16 ` [Bug c++/66935] " anders.granlund.0 at gmail dot com
  2021-12-03  0:47 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: anders.granlund.0 at gmail dot com @ 2015-07-19  2:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66935
           Summary: Compiler rejects well-formed program with local extern
                    variable declaration 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 well-formed. The two declarations in main are not
conflicting.

  int x = 1;

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

The following output is given when compiling it:

  prog.cc: In function 'int main()':
  prog.cc:5:13: error: redeclaration of 'int x'
       using ::x;
               ^
  prog.cc:4:16: note: previous declaration 'int x'
       extern int x;
                  ^

Expected behaviour is to get no error messages.


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

* [Bug c++/66935] Compiler rejects well-formed program with local extern variable declaration and using-declaration
  2015-07-19  2:05 [Bug c++/66935] New: Compiler rejects well-formed program with local extern variable declaration and using-declaration anders.granlund.0 at gmail dot com
@ 2015-07-27  1:16 ` anders.granlund.0 at gmail dot com
  2021-12-03  0:47 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: anders.granlund.0 at gmail dot com @ 2015-07-27  1:16 UTC (permalink / raw)
  To: gcc-bugs

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

Anders Granlund <anders.granlund.0 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Anders Granlund <anders.granlund.0 at gmail dot com> ---
I'm moving this into 66934 since it is very similar.

*** This bug has been marked as a duplicate of bug 66934 ***


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

* [Bug c++/66935] Compiler rejects well-formed program with local extern variable declaration and using-declaration
  2015-07-19  2:05 [Bug c++/66935] New: Compiler rejects well-formed program with local extern variable declaration and using-declaration anders.granlund.0 at gmail dot com
  2015-07-27  1:16 ` [Bug c++/66935] " anders.granlund.0 at gmail dot com
@ 2021-12-03  0:47 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-03  0:47 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-12-03
             Status|RESOLVED                    |NEW
     Ever confirmed|0                           |1
         Resolution|DUPLICATE                   |---
           Keywords|                            |rejects-valid

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, this was not a dup of bug 66934 after all.
Though there might be a dup of this bug already.

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

end of thread, other threads:[~2021-12-03  0:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-19  2:05 [Bug c++/66935] New: Compiler rejects well-formed program with local extern variable declaration and using-declaration anders.granlund.0 at gmail dot com
2015-07-27  1:16 ` [Bug c++/66935] " anders.granlund.0 at gmail dot com
2021-12-03  0:47 ` 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).