You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2007/03/07 19:09:24 UTC

[jira] Created: (STDCXX-347) [HP aCC] incorrect warning 578

[HP aCC] incorrect warning 578
------------------------------

                 Key: STDCXX-347
                 URL: https://issues.apache.org/jira/browse/STDCXX-347
             Project: C++ Standard Library
          Issue Type: Bug
          Components: External
         Environment: HP aCC 3
            Reporter: Martin Sebor
            Priority: Trivial


-------- Original Message --------
Subject: incorrect warning 578
Date: Tue, 06 Mar 2007 11:31:25 -0700
From: Martin Sebor <se...@roguewave.com>
Organization: Rogue Wave Software
To: acxx@cup.hp.com

The warning below is incorrect -- there clearly is a way to
initialize such members.

Martin

$ cat t.cpp && aCC +w t.cpp
int main ()
{
    static const struct {
        const char s [2];
    } a[] = { "a" };
}

Warning 578: "t.cpp", line 4 # A class member may not be a const array 
since there is no way to initialize such a member.
            const char s [2];
                       ^


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-347) [HP aCC] incorrect warning 578

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479465 ] 

Martin Sebor commented on STDCXX-347:
-------------------------------------

-------- Original Message --------
Subject: Re:  incorrect warning 578
Date: Tue, 6 Mar 2007 20:18:37 -0800 (PST)
From: Dennis Handly <dh...@cup.hp.com>
To: acxx@cup.hp.com, sebor@roguewave.com

>From: Martin Sebor <se...@roguewave.com>
>The warning below is incorrect -- there clearly is a way to initialize
>such members.

>Warning 578: # A class member may not be a const array 
>since there is no way to initialize such a member.

Yes, I've seen this before.  It is also there in aCC6.  I filed 2 CRs:
JAGag34016:
Warning 578 shouldn't occur if using {} initializer

JAGag34018:
Warning 2368 shouldn't occur if using {} initializer
warning #2368-D: class "XX" defines no constructor to initialize the
following: const member "XX::s"


> [HP aCC] incorrect warning 578
> ------------------------------
>
>                 Key: STDCXX-347
>                 URL: https://issues.apache.org/jira/browse/STDCXX-347
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: External
>         Environment: HP aCC 3
>            Reporter: Martin Sebor
>            Priority: Trivial
>
> -------- Original Message --------
> Subject: incorrect warning 578
> Date: Tue, 06 Mar 2007 11:31:25 -0700
> From: Martin Sebor <se...@roguewave.com>
> Organization: Rogue Wave Software
> To: acxx@cup.hp.com
> The warning below is incorrect -- there clearly is a way to
> initialize such members.
> Martin
> $ cat t.cpp && aCC +w t.cpp
> int main ()
> {
>     static const struct {
>         const char s [2];
>     } a[] = { "a" };
> }
> Warning 578: "t.cpp", line 4 # A class member may not be a const array 
> since there is no way to initialize such a member.
>             const char s [2];
>                        ^

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.