From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27580 invoked by alias); 10 Apr 2002 17:56:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 27559 invoked by uid 71); 10 Apr 2002 17:56:02 -0000 Resent-Date: 10 Apr 2002 17:56:02 -0000 Resent-Message-ID: <20020410175602.27558.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, akjones@ece.northwestern.edu Received:(qmail 23302 invoked by uid 61); 10 Apr 2002 17:53:25 -0000 Message-Id:<20020410175325.23301.qmail@sources.redhat.com> Date: Wed, 10 Apr 2002 10:56:00 -0000 From: akjones@ece.northwestern.edu Reply-To: akjones@ece.northwestern.edu To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/6248: gcc 2.95.3 and 3.0.4 accept bool assigned to bool * function parameter X-SW-Source: 2002-04/txt/msg00590.txt.bz2 List-Id: >Number: 6248 >Category: c++ >Synopsis: gcc 2.95.3 and 3.0.4 accept bool assigned to bool * function parameter >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Apr 10 10:56:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: akjones@ece.northwestern.edu >Release: 2.8.1, 2.95.3, 3.0.4 >Organization: >Environment: Sun Solaris 8 >Description: g++ from 2.95.3 and 3.0.4 allow passing a constant parameter "false" to a function with bool * parameter without complaint. There is a complaint when true is passed rather than false: foo.cc: In function `int main()': foo.cc:7: passing `bool' to argument 1 of `foo(bool *)' lacks a cast gcc-2.8.1 complains either way with the following: foo.cc: In function `int main()': foo.cc:7: argument passing to `bool *' from `bool' >How-To-Repeat: compile foo.cc with g++ from 2.8.1 and 2.95.3 to see compiler errors >Fix: Well, the fix is obviously to write correct code, however, it seems like the compiler should probably detect this problem. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/x-gzip-compressed; name="foo.tar.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="foo.tar.gz" H4sIAEp6tDwAA+1ZXW/aMBTl1fkVHgiJbpDZzgdt97QxQJW6turUp2lCIZguXYhRkn5t2n+f7QQS IIhVa7Jq+DyQm+sb5x4713EORD/U8dtaqUDIRF3L4kdidG3CjwjZli2PKWqoa1oWj0KGWUOYIBvX oFVuWgluo9gJIaw5329YQKOtcfQIjZ2AhjeUVpFWVSBy/qeM6a5b1j0Q5vNtmtvn3+5m84/5s4AN bFo1iMpKKI89n/875k0gn/7WmDEfvh4fwJ+a9kvTvCCGM8cLWtIBZcjU8SN68E60/+u0FZ4JWf17 Xln32FX/GJm59d+Q9c+bVf1XgAbEsJ4s/3VNLQZ7h6z+tz/6f4sd9U8M21jb/xnIwKr+qwDQp55P wXIJuHZdMnLZbM69E/1Y0yPqxh4LQF2P6UNc14Du+N51AE1uXfts7PhiORiNBhdj7okf5xQsHe3G 9DaQl/OmechcgAjSFq2889PTwQd8rIFXjYvL89Pz4VW/AZEGIueOwmY0b3cwJm1uiMje4ASthWIe GsOmh9pfmtP5G/vwqwbGkMcSDQRsnp7g5ES45S3FDUMai58oZiGVafSxbJtS0apH3o88jaShk+O5 MQZieVzyFycF3E1NNKS0yZ/TXh8hTmjG7iBqc+YpR2PJ0ShkR1J2JGMnk0ycHZl9fq7pt9E0dGa0 3m44vs/cduM+9GKqcf6X7z/1Rx/6w5Oz0Uj0duvcs3ACeE/93kkfd7jxWRjawsgFoQeesD5+jCk3 cWYWe7tuZttWZufctLCPo+LrprmJW6S7xmDwMWUgDG1hrAZJV2dtJFYi+EO9ep50mrjTZMyVCPFw b4RMcqOSI0omO5n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