36 Commits

Author SHA1 Message Date
Piotr Trojanek
8af3b9bfa1 Remove obsolete use of renamed Ada 83 package
Change use of Unchecked_Deallocation (which is obsolete since Ada 95) to
Ada.Unchecked_Deallocation to avoid warnings recently enabled in GNAT.

TN: V209-051
Change-Id: I58f1499218c1f132773892308e3d082f3cc52375
2022-06-10 11:35:55 +02:00
Thomas Quinot
f6b1d049af Remove unnecessary use-type and use-package clauses
These redundant clauses will be flagged by the compiler in the near
future (PA07-083).

Q725-034

Subversion-branch: /trunk/polyorb
Subversion-revision: 257110
2017-08-02 08:40:59 +00:00
Thomas Quinot
895156afbb * compilers/common_files/utils.adb, utils.ads
(Starts_With): New subprogram

* compilers/gnatdist/xe_utils.adb
  (Scan_Dist_Arg):
  Pass --unchecked-shared-lib-imports down to gnat ls

Fixes P120-017

Subversion-branch: /trunk/polyorb
Subversion-revision: 246124
2016-02-08 09:31:17 +00:00
Bob Duff
b63c10e2bb Minor: Put spaces around binary operators. Needed to avoid new compiler
warnings.
N216-004

Subversion-branch: /trunk/polyorb
Subversion-revision: 223532
2014-02-18 23:12:33 +00:00
Bob Duff
0d4a14d013 Get rid of warnings on duplicates of names declared in Standard.
Part of K512-011.

Subversion-branch: /trunk/polyorb
Subversion-revision: 195605
2012-09-26 13:52:29 +00:00
Thomas Quinot
99f521407c Switch to GPLv3 for KC20-016
Subversion-branch: /trunk/polyorb
Subversion-revision: 183131
2012-01-04 22:41:08 +00:00
Thomas Quinot
67944577e5 Remove pragma License
For K926-038.

Subversion-branch: /trunk/polyorb
Subversion-revision: 180355
2011-10-21 09:36:18 +00:00
Bob Duff
09ccaea3e6 Use Ada.Characters.Handling instead of Charset.
Fixes J119-022.

Subversion-branch: /trunk/polyorb
Subversion-revision: 179204
2011-09-25 15:11:58 +00:00
Bob Duff
a7e85642f0 Use Ada.Characters.Handling in charset.adb.
First step for J119-022.

Subversion-branch: /trunk/polyorb
Subversion-revision: 179203
2011-09-24 21:45:41 +00:00
Bob Duff
8779f5a543 Minor reformatting
Subversion-branch: /trunk/polyorb
Subversion-revision: 179201
2011-09-24 20:01:15 +00:00
Bob Duff
7e2f59ae82 Minor: Remove constant No_Str, because it's more readable to put the
empty
string literal in line.

Subversion-branch: /trunk/polyorb
Subversion-revision: 179197
2011-09-24 17:36:54 +00:00
Bob Duff
68f649638b Minor comment fixes.
Subversion-branch: /trunk/polyorb
Subversion-revision: 179195
2011-09-24 15:48:46 +00:00
Bob Duff
2ca5264556 * MANIFEST:
Add Source_Input package.

* compilers/common_files/locations.adb:
Add assertion.

* compilers/common_files/namet.adb:
Fix bug: Hash function was crashing on the empty string.
Add a new Hash function for type Name_Id, so we can instantiate
Containers.Mapping packages with Key => Name_Id.

* compilers/common_files/namet.ads:
New Hash function.

* compilers/common_files/output.ads:
Add assertion.

* compilers/iac/backend-be_corba_ada-generator.adb:
Don't require comments to avoid spaces at beginning and end (it appears
to
already work).

* compilers/iac/backend-be_corba_ada-idl_to_ada.adb:
* compilers/iac/backend-be_corba_ada-idl_to_ada.ads:
Pass through Include_Source flag.

* compilers/iac/backend-be_corba_ada-nutils.ads:
* compilers/iac/backend-be_corba_ada-nutils.adb:
(Make_Comment_Header): Include the IDL source code at the top of the
Stubs
package spec. The IDL is not (yet) interspersed with the Ada.
(New_Node): Attach a source location to nodes of the Stubs package.
Previously,
almost all of the nodes had No_Location. This is to support the
interspersal.
Misc cleanup.

* compilers/iac/backend-be_corba_ada-stubs.adb:
Set Current_Loc, so New_Node can know the source location. It's a shame
to use
a global variable here, but it seems better than changing huge numbers
of calls
to node-creation routines to pass it as a parameter.
Pass Include_Source => True to enable inclusion in the Stubs package
spec;
all other package specs and bodies default to False.

* compilers/iac/iac.adb:
Use new Source_Input package, and new interface to Lexer.

* compilers/iac/lexer.ads:
* compilers/iac/lexer.adb:
Use new Source_Input package, which requires changing the interface to
Preprocess and Process.
Do not repeatedly re-read files.

* compilers/iac/mknodes.adb:
Use new Source_Input package. Use Open_Source to open the file.

* compilers/iac/parser.adb:
Use new interface to Lexer.

* compilers/iac/source_input.ads:
* compilers/iac/source_input.adb:
New package to support interspersed source.
Also allows for some cleanup in the lexer and elsewhere.

Fixes IA01-037.

Subversion-branch: /trunk/polyorb
Subversion-revision: 179194
2011-09-24 15:02:07 +00:00
Thomas Quinot
c49e6a61b8 Integrate contribution from Oliver Kellogg, with minor reformatting:
Add support for #pragma derived, subtype, range, and switchname, in IAC.

Document as NF-28-K906-034


----
date: 2011/09/08 13:34:40;  author: quinot;
Part of K614-012

Subversion-branch: /trunk/polyorb
Subversion-revision: 178347
2011-09-08 13:23:34 +00:00
Thomas Quinot
5a082a3ced Provision for cross building a DSA application with gnatdist.
For K322-023

----
date: 2011/03/28 09:33:51;  author: quinot;
Also remove legacy idlac -> iac symlink, in the context of J121-026

Subversion-branch: /trunk/polyorb
Subversion-revision: 171684
2011-03-24 18:56:46 +00:00
Bob Duff
73779fcce7 Send the perfect hash functions to standard output, if
the -p flag is set. This is a correction to the previous fix,
which evilly depended on the new Use_Stdout parameter of
GNAT.Perfect_Hash_Generators.Produce; we want to be able to build
PolyORB with
older versions of GNAT. We keep that parameter, in case it comes in
handy in
the future; it is now unused.

Follow-on to J503-020.

Subversion-branch: /trunk/polyorb
Subversion-revision: 159708
2010-05-05 22:39:39 +00:00
Bob Duff
852b3ba68d Make package Errors be self-initializing.
Follow-on to J329-019.

Subversion-branch: /trunk/polyorb
Subversion-revision: 158472
2010-03-31 20:32:34 +00:00
Bob Duff
d5d8ace594 Use a separate Message_Template type for message templates, instead of
using
type String. Conceptually, it's not a String to be printed, it's a
template
with blanks to be filled in, and then printed. This avoids accidentally
using
tainted data in the template.

Change all uses of Display_Error to avoid tainted data -- always pass
Strings
via the "%" special character, rather than concatenating them into the
template.

Add new short-hand versions of Display_Error and Command_Line_Error, for
use
when a single String is being inserted via "%".

Initialize sets Error_Int to a value more likely to be noticed in case
of bugs.

Unexpected_Token doesn't need a default parameter, which simplifies it.

There were three occurrences of a cut&paste error in analyzer.adb, where
"Error_Name (1)" was used, when "Error_Name (2)" is correct.

Fixes J329-019.

Subversion-branch: /trunk/polyorb
Subversion-revision: 158458
2010-03-31 16:06:55 +00:00
Bob Duff
c7ec07f267 Make sure exit status is non-zero on Fatal_Error. This was a mistake in
the
previous revision.

Misc comment fixes.

For H813-038.

Subversion-branch: /trunk/polyorb
Subversion-revision: 157913
2010-03-22 21:28:16 +00:00
Bob Duff
74f9b7ac49 Minor cleanup: no need for type conversion.
Subversion-branch: /trunk/polyorb
Subversion-revision: 157850
2010-03-20 14:13:32 +00:00
Thomas Quinot
a437d0bb05 Reorganization of autoconf setup.
This change removes the need for the prepare_distrib script to modify
configure.ac. Instead, when preparing a source package, an additional
file is created (support/distrib.m4) which contains appropriate
definitions
to tweak those settings that need to be changed from their default value
(which is used when building straight from an SCM checkout).

Subversion-branch: /trunk/polyorb
Subversion-revision: 127140
2008-07-28 09:44:36 +00:00
Bob Duff
a31886f79e Make Locations.Image pure. It was writing on global variables
(Namet.Name_Buffer, Namet.Name_Len), which caused a bug when called
from
 Errors.Display_Error, which uses the same global variables for a
different
 purpose.
Move Image on Int from Frontend.Debug and Backend.BE_CORBA_Ada.Debug to
Utils,
 and make it work for negative numbers. This is so Locations.Image can
call
 it.
Errors.Display_Error was calling Image (Error_Loc (1)) when it should
use
 Image (Error_Loc (2)). This is the case where the "!" refers to a
different
 file, due to #include, and we want to display something like
 "include_file_name.idl:12:34".
Misc code cleanup and added comments.
Fixes H723-022.

Subversion-branch: /trunk/polyorb
Subversion-revision: 127086
2008-07-24 19:54:38 +00:00
Thomas Quinot
0ad0c8c598 Record Subversion revision in version information.
Subversion-branch: /trunk/polyorb
Subversion-revision: 126875
2008-07-18 12:49:43 +00:00
Bob Duff
faf7eeb066 Avoid comparing "X = Dir_Separator", because on windows, Dir_Separator =
'\',
 but windows actually allows two directory separators: '\' and '/'. Use
new
 function Utils.Is_Dir_Separator instead. Clean up usage of
Dir_Separator
 vs. Directory_Separator, from GNAT.Directory_Operations/GNAT.OS_Lib.
When iac prints messages, such as "idlac: 2 warning(s)", strip off the
 directory name and the ".exe" extension from the command name, so it
looks the
 same on Unix and Windows. Use new function Utils.Simple_Command_Name.
Part of H513-018.

Subversion-branch: /trunk/polyorb
Subversion-revision: 124972
2008-05-22 19:55:18 +00:00
Bob Duff
6a88c396c7 Remove 'in' on parameters (use implicit 'in') to match style.
Also fix other stylistics nits found by pre-commit checks.

Subversion-branch: /trunk/polyorb
Subversion-revision: 122691
2008-03-05 13:33:12 +00:00