Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feed.news.qwest.net!mpls-nntp-02.inet.qwest.net!216.196.98.147.MISMATCH!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!nerds-end From: Robert A Duff Newsgroups: comp.compilers Subject: Re: Adding Blank Line In Source Causes Change In Executable Date: Tue, 06 Mar 2012 16:25:28 -0500 Organization: The World Public Access UNIX, Brookline, MA Lines: 38 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-03-010@comp.compilers> References: <12-03-007@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1331069583 31730 64.57.183.58 (6 Mar 2012 21:33:03 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Tue, 6 Mar 2012 21:33:03 +0000 (UTC) Keywords: code, practice Posted-Date: 06 Mar 2012 16:33:03 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:477 "Morris, John M CIV NSWCDD, Q34" writes: > ...in my case I am using AdaCore's GPS > development environment (which uses gcc I believe) to compile Ada GPS is the IDE. The compiler is GNAT, and yes, it's part of gcc (the GNU Compiler Collection). > programs for a 68040 processor. I am not intentionally including debug > information in my builds. > I've noticed that if I add one blank line to a source file (e.g., I > hit right before the last assignment statement in the Ada > file) and recompile, I get a different output/binary/executable > file. (In this example, only one byte in the executable is different, > and it is 1 greater than the original value. If I hit 3 times > and recompile, the byte is 3 greater than the original value.) My guess is that there's an implicit 'raise' of an exception, perhaps for some constraint check on the assignment, and this contains the line number, so it can print a message if the check fails, something like: Constraint_Error raised some_file.adb line 1234. or something like that. If you change the line number, that message will need to change. If you look at the generated assembly code, you'll probably see a call something like: Rcheck_12(File => ..., Line => 1234); The -gnatD output might also show you what's going on. - Bob