public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: yuri.delia@ubiest.com To: gcc-gnats@gcc.gnu.org Subject: c++/7214: const declaration syntax and multiple definitions Date: Fri, 05 Jul 2002 02:56:00 -0000 [thread overview] Message-ID: <20020705094942.14390.qmail@sources.redhat.com> (raw) >Number: 7214 >Category: c++ >Synopsis: const declaration syntax and multiple definitions >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Jul 05 02:56:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Yuri D'Elia >Release: g++ 2.95.3, g++ 3.0, g++ 3.1 from current stable branch >Organization: >Environment: debian GNU/Linux 3.0, x86 >Description: Declaring a costant charater array using this syntax: const char* array("test"); or const char* array = "test"; withing multiple compilation units leads to a multiple definition at the linking stage. defining an array using this syntax: const char array[]("test"); seems to be unallowed. wich is correct. The unique way to define a correct and working constant character array is this one: const char array[] = "test"; I attach four test cases. just run: make prog1 prog2 # should fail with multiple definitions make prog3 # deprecated syntax make prog4 # working the first two test cases (prog1, prog2) are probably a software bug. >How-To-Repeat: See the attachment. >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/x-tgz; name="gccBug.tar.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gccBug.tar.gz" H4sIAIJoJT0AA+2aS2+bQBDHfc1+ipXtSHYsu/sCJLeRqkY9RE3aHiNFUYXWYKM6YGHcpqr63bvA GoEfbS+sqZnfAWJmBGMvf+YR5lK+28xfdeqEEEEcy1J7wghn6Z4QW+9zOsqBUmYLavMOoVQod2zV GpVms07cGOPOd/eb9/Jy3E+5+b6JgMwyz9f/3v3q+cHSq+UahKrlFuTo+jvC2a4/F5byo1zdAR1M aolmh5avf6+Hn/XaI9TDcjTCMnpeqY8xunl4wNNrPB+NxnxCU3O8WXprdPPp/vPt3Xt8jfsD5TPE Y4nHEe6/xf036O7244eSJT88QuhyEk3x5URKdKFs+RmG6TnVzz/3kjVyl8spXsXRnGZblm15thUI ZYapijUIJxHehEFCx7T4i02i9LTptYe5L6v4ssKXHfDlFV9e+PIDvqLiKwpfseMrl54bTtFF/IzH Pr5SNvVVZ95qjfZin2I3jt0fdLJYoL1gtZFtjZXotJFvjZVwtFGkRnR0/bX+t0FJWcM9lutfHH/+ M2urf2YRK9O/xUD/JugFoVxuZh7uFjdh9/jdApwbFf2zBujf4Zn+bQL6NwHov91o/Wc1TS3i7/yD /qld6J9Zyo8yh1DQvwmCMEHp4g+G6OcvEH7r0PovHv51XONv+qe06P+ZcESW/x3o/43QC/xw5vm6 Bf2iesWe+hiEXukIklG4TrBcuPGVPjzo+m6YuOskkN3ha9XbeuEs8P/QZwLNpKx/dir9s2L+y7JZ YKp/6P+NUNE/29M/O6x/hq9x6QkAD4D/llL/z5ow/3NsO+//If8bYaf/Z9D/t4uK/hsw/3O28z8O +jcB6L/dlOt/fvr6n1MO+d8klfqf79X/fKf+10cfn2AAcB6U8j9vQP3PqZXP/9L3v0D/9bOT/znk /3ZR0f/p639OHZ3/Yf5nBNB/uynX/+Jk9T8t9M/t/P1fG/K/ESr1v9ir/8XB+l88PsE/AM6DUv4X Taj/BWHw/q9BdvK/gPzfLir6b0D9LyjN9Q/zfyOA/gEAAAAAAAAAAAAAAAAAAADg/PgNB6AkYgBQ AAA=
next reply other threads:[~2002-07-05 9:56 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-07-05 2:56 yuri.delia [this message] 2002-07-05 3:09 nathan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020705094942.14390.qmail@sources.redhat.com \ --to=yuri.delia@ubiest.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).