Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: Undefined behaviour in C [was Re: The Cost of Dynamism] Date: Fri, 25 Mar 2016 22:56:51 -0400 Lines: 10 Message-ID: References: <56e7483d$0$1608$c3e8da3$5496439d@news.astraweb.com> <56ef9787$0$1516$c3e8da3$5496439d@news.astraweb.com> <56f02196$0$1588$c3e8da3$5496439d@news.astraweb.com> <56f42d9f$0$1618$c3e8da3$5496439d@news.astraweb.com> <56f55e2e$0$1619$c3e8da3$5496439d@news.astraweb.com> <87wpoq1omm.fsf@elektro.pacujo.net> <56f5f81d$0$1585$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de J32QfRQzWE+qUL+PyXxWCAmokIx9bTyqo78FrC9FUM6w== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'compiler': 0.05; 'preference': 0.05; 'undefined': 0.07; 'received:internal': 0.09; 'semantics': 0.09; 'ignore': 0.14; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.212': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'changes': 0.20; 'code,': 0.23; 'code.': 0.23; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'fri,': 0.27; 'behaviour': 0.29; 'subject: [': 0.29; 'code': 0.30; 'point': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'changing': 0.34; 'add': 0.34; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'things': 0.38; 'received:66': 0.38; 'means': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'behavior': 0.61; 'subject:The': 0.61; 'header:Message-Id:1': 0.61; 'different': 0.63; 'mar': 0.65 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=C3Y7M5anL8BIW/OpaX+YyIc6NKY=; b=lC/NEb XH3ip+grY63MU92Qh39j/R9an5/hPydd2jsZlx8/sMahY65CFPLpHyIValYYzbPG HFzYZI5d2WcBybE8kvLVYlSkim+l3V8anoGK5jfHj7roJIKEUkwZchp8bTRgfNSv NagN6vOfac7DPzhEklnwJKWMbPTcRyj3cVUYA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=C3Y7M5anL8BIW/O paX+YyIc6NKY=; b=jmh4e1jQlnA72tCV318RROt6k5vHiZNpUmd/l5bT5Ah8UuR DOUJADNH2qhRU5ienRidpC/GtGsx8u9b91RcqactxG8xiO7T8Dyv5NWVmd9z1g2e vFRoNRTdyalFMncGi6RbrFDvpOrmVuJrJOtYa44EPiI7LnEV75n9ZXu1JCI4= X-Sasl-Enc: a4HGSCPQOmpODZUmWtJaPg3FUAIgTWUcywcXBrraTDRv 1458961011 X-Mailer: MessagingEngine.com Webmail Interface - ajax-eaa4717d In-Reply-To: <56f5f81d$0$1585$c3e8da3$5496439d@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:105721 On Fri, Mar 25, 2016, at 22:46, Steven D'Aprano wrote: > Culturally, C compiler writers have a preference for using undefined > behaviour to allow optimizations, even if it means changing the semantics > of your code. The C compiler is allowed to ignore your code, move it > around > so that things happen in a different order, or add its own code, even if > that changes the semantics of the code. Er, the point of undefined behavior is that your code doesn't *have* semantics.