From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 29 17:22:09 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2066CA01 for ; Sun, 29 Dec 2013 17:22:09 +0000 (UTC) Received: from mail-qe0-x229.google.com (mail-qe0-x229.google.com [IPv6:2607:f8b0:400d:c02::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CEDA313E5 for ; Sun, 29 Dec 2013 17:22:08 +0000 (UTC) Received: by mail-qe0-f41.google.com with SMTP id gh4so10953719qeb.0 for ; Sun, 29 Dec 2013 09:22:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=qNcoUA+MwIVihjf5D4t7TvagSR2caJG94EEvc/SssAE=; b=ybId4IbyhcrLbuLXKr5HBFEPEVchmeSc7JcuNKxaFWC28ysZ8CuFoi9fal3Vtg/DKz HgP+8AGGlZd5rQR/8uJ9D8d87aOWHJ7wF/mVAvHGFcm+NcTtU7BlY3QWXZxebC7FxS+4 mBYWqTjrTkYVyUcDV2x4wl9TvgOrqKvkEsLnKC0EiZn0c2HHMG/5qCP0nxT7TDVQbW9q sYEkCkji7Qe323t9c3YcM87RBbIXP+csCzBvc+zCIeMG/6SKv/DcBQhQ/lVIkw2eNtUE t/cCju0rZU8u5MYu0DyWZE9SoUcaq6H8xL8K4hq+IbCzUBMx7UirLm/3tdEF/4abGxkP ACHQ== MIME-Version: 1.0 X-Received: by 10.49.108.200 with SMTP id hm8mr102562194qeb.53.1388337727470; Sun, 29 Dec 2013 09:22:07 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.229.216.135 with HTTP; Sun, 29 Dec 2013 09:22:07 -0800 (PST) In-Reply-To: References: Date: Sun, 29 Dec 2013 09:22:07 -0800 X-Google-Sender-Auth: 87EoADSYCMFIUi5KeTlJ-nRiW_A Message-ID: Subject: Re: template example From: Matthew Fleming To: Joe Nosay Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Dec 2013 17:22:09 -0000 On Sun, Dec 29, 2013 at 9:11 AM, Joe Nosay wrote: > On Sat, Dec 28, 2013 at 10:44 PM, Joe Nosay > wrote: > > > > > > > > > On Sat, Dec 28, 2013 at 3:52 AM, Tim Kientzle wrote: > > > >> > >> On Dec 27, 2013, at 7:41 PM, Joe Nosay wrote: > >> > >> > The standard "Hello World!" doesn't seem to work. > >> > >> Which one? Share the program you=92re trying to compile and what err= ors > >> you=92re seeing. > >> > >> Tim > >> > >> > >> > > > > Thanks @Alfred_Perlstein it worked with that example using clang > > -fsyntax-only h.cpp > > > > a.out is the file. > > > > > Trying a different approach with ::: > #include > > #include > > int > main(int Argc, char **Argv) > { > int rv; > > rv =3D system("echo 'ls /tmp' " && " echo blee bble blle "); > If this is exactly what you compiled, that's the equivalent of: rv =3D system(1); The two strings count as "true" and && is logical and. I'd expect this to crash when running. Maybe you meant: rv =3D system("echo 'ls /tmp' && echo blee bble blle"); Cheers, matthew