public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66159] New: bogus warning for alias-declaration using elaborated-type-specifier
@ 2015-05-15 13:04 redi at gcc dot gnu.org
  2020-05-26 15:55 ` [Bug c++/66159] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2015-05-15 13:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66159
           Summary: bogus warning for alias-declaration using
                    elaborated-type-specifier
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

struct X { };

typedef struct ::X x1;

using x2 = struct ::X;


t.cc:5:21: warning: declaration ‘struct X’ does not declare anything
 using x2 = struct ::X;
                     ^

The two forms should be equivalent.
>From gcc-bugs-return-486331-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri May 15 13:17:37 2015
Return-Path: <gcc-bugs-return-486331-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 361 invoked by alias); 15 May 2015 13:17:37 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 124955 invoked by uid 48); 15 May 2015 13:17:33 -0000
From: "arjen.markus895 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/50221] Allocatable string length fails with array assignment
Date: Fri, 15 May 2015 13:17:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.6.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: arjen.markus895 at gmail dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-50221-4-Knc3VtUHLn@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-50221-4@http.gcc.gnu.org/bugzilla/>
References: <bug-50221-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg01171.txt.bz2
Content-length: 1076

https://gcc.gnu.org/bugzilla/show_bug.cgi?idP221

Arjen Markus <arjen.markus895 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arjen.markus895 at gmail dot com

--- Comment #4 from Arjen Markus <arjen.markus895 at gmail dot com> ---
I had a probably related failure with the following program using 4.9.2 under
Cygwin.

The program:

! chk_alloc_string.f90 --
!     Check if allocatable-length strings work in principle
!
program chk_alloc_string
    implicit none

    character(len=:), dimension(:), allocatable :: strings
    integer :: i

    allocate( character(10):: strings(1:3) )

    !strings = [ "A", "C", "ABCDE", "V" ]
    strings = [ character(len=4) :: "A", "C", "ABCDE", "V" ]

    write(*,*) len(strings(1)), size(strings)
    write(*,'(a)') strings
end program chk_alloc_string

The output:

           4           4
ACAV
CAV
AV
V

where I expected:
           4           4
A
C
ABCD
V


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

end of thread, other threads:[~2021-08-04  3:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-15 13:04 [Bug c++/66159] New: bogus warning for alias-declaration using elaborated-type-specifier redi at gcc dot gnu.org
2020-05-26 15:55 ` [Bug c++/66159] " redi at gcc dot gnu.org
2020-05-26 16:21 ` redi at gcc dot gnu.org
2020-05-27  9:47 ` redi at gcc dot gnu.org
2020-06-17 19:27 ` cvs-commit at gcc dot gnu.org
2020-06-17 19:28 ` redi at gcc dot gnu.org
2021-08-04  3:26 ` 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).