🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3955

Re: C++ syntactic trap

#3955
From: David Bradley
Date: Mon, 08 Apr 1996 14:35
26 lines
1824 bytes
vavasis@CS.Cornell.EDU (Stephen Vavasis) wrote:

>I would like to make a plea to the compiler-writers who read this
>group: please issue warnings for syntactic trouble spots!  Implicit
>type conversion probably creates other traps that I haven't thought
>of.  C++ programmers like me need help from the compiler to navigate
>the traps!

What about when I create a normal object?

MyClass* pMyObject = new MyClass(Initializer);

Should this also generate a warning?  If the syntax was exceptional,
but legal,  then I'd say'd it should generate a warning.  However,
this syntax is not exception and is used quite frequently.

===============================================
DISCLAIMER: I may be a member of humanity,
but I'm not a spokesman for humanity.
	davidb@datalytics.com
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
Technical Details
Message-ID: <31691990.256606019@news>
Path: arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-back
References: <4k3q4p$lkd@syn.cs.cornell.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-back
From: davidb@datalytics.com (David Bradley)
Newsgroups: comp.std.c++
Subject: Re: C++ syntactic trap
Date: 08 Apr 96 14:35:56 GMT
Organization: Datalytics Inc.
Approved: fjh@cs.mu.oz.au
Message-ID: <31691990.256606019@news>
References: <4k3q4p$lkd@syn.cs.cornell.edu>
NNTP-Posting-Host: mundook.cs.mu.oz.au
X-Original-Date: Mon, 08 Apr 1996 13:57:04 GMT
X-Newsreader: Forte Agent .99d/32.182
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMWkkVOEDnX0m9pzZAQFs9wF+KPQA+im+crpIa499BIIiR/cJ2t27G65O
 pqhda5rOXObdoeDpCpeHRK2VY+OsmCHR
 =VK/x
Originator: fjh@mundook.cs.mu.OZ.AU