Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #477
| From | Robert A Duff <bobduff@shell01.TheWorld.com> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: Adding Blank Line In Source Causes Change In Executable |
| Date | 2012-03-06 16:25 -0500 |
| Organization | The World Public Access UNIX, Brookline, MA |
| Message-ID | <12-03-010@comp.compilers> (permalink) |
| References | <12-03-007@comp.compilers> |
"Morris, John M CIV NSWCDD, Q34" <john.m.morris@navy.mil> 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 <Enter> 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 <Enter> 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
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
Adding Blank Line In Source Causes Change In Executable "Morris, John M CIV NSWCDD, Q34" <john.m.morris@navy.mil> - 2012-03-06 08:32 -0500
Re: Adding Blank Line In Source Causes Change In Executable glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-03-06 19:51 +0000
Re: Adding Blank Line In Source Causes Change In Executable Robert A Duff <bobduff@shell01.TheWorld.com> - 2012-03-06 16:25 -0500
Re: Adding Blank Line In Source Causes Change In Executable HOKIENERD <hokienerd@gmail.com> - 2012-03-12 07:36 -0700
Re: Adding Blank Line In Source Causes Change In Executable Robert A Duff <bobduff@shell01.TheWorld.com> - 2012-03-13 09:34 -0400
Re: Adding Blank Line In Source Causes Change In Executable glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-03-14 05:26 +0000
Re: Adding Blank Line In Source Causes Change In Executable HOKIENERD <hokienerd@gmail.com> - 2012-03-26 07:33 -0700
Re: Adding Blank Line In Source Causes Change In Executable Robert A Duff <bobduff@shell01.TheWorld.com> - 2012-03-26 13:36 -0400
csiph-web