+2014-07-29 Robert Dewar <dewar@adacore.com>
+
+ * gnat_rm.texi, sem_prag.adb: Minor reformatting.
+
+2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
+
+ * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
+ complexity metrics.
+
+2014-07-29 Thomas Quinot <quinot@adacore.com>
+
+ PR ada/60652
+ * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
+ CRTSCTS to be visible.
+
+2014-07-29 Bob Duff <duff@adacore.com>
+
+ * g-trasym.adb, g-trasym.ads: Code cleanup.
+
2014-07-29 Doug Rupp <rupp@adacore.com>
* sigtramp-vxworks.c: Minor reformatting.
-- --
-- B o d y --
-- --
--- Copyright (C) 1999-2012, AdaCore --
+-- Copyright (C) 1999-2014, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
end if;
end Symbolic_Traceback;
- function Symbolic_Traceback (E : Exception_Occurrence) return String is
+ function Symbolic_Traceback
+ (E : Ada.Exceptions.Exception_Occurrence) return String
+ is
begin
return Symbolic_Traceback (Tracebacks (E));
end Symbolic_Traceback;
-- --
-- S p e c --
-- --
--- Copyright (C) 1999-2012, AdaCore --
+-- Copyright (C) 1999-2014, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- Symbolic_Traceback return a list of addresses expressed as "0x..."
-- separated by line feed.
-with Ada.Exceptions; use Ada.Exceptions;
+with Ada.Exceptions;
package GNAT.Traceback.Symbolic is
pragma Elaborate_Body;
-- Note: This procedure may be installed by Set_Trace_Decorator, to get a
-- symbolic traceback on all exceptions raised (see GNAT.Exception_Traces).
- function Symbolic_Traceback (E : Exception_Occurrence) return String;
+ function Symbolic_Traceback
+ (E : Ada.Exceptions.Exception_Occurrence) return String;
-- Build string containing symbolic traceback of given exception occurrence
end GNAT.Traceback.Symbolic;
@itemize @bullet
@item Ivdep
-The programmer asserts that there are no loop-carried dependencies which would prevent consecutive iterations of the loop from being executed simultaneously.
+The programmer asserts that there are no loop-carried dependencies
+which would prevent consecutive iterations of the loop from being
+executed simultaneously.
@item No_Unroll
@end itemize
-These hints do not void the need to pass the appropriate switches to the
+These hints do not remove the need to pass the appropriate switches to the
compiler in order to enable the relevant optimizations, that is to say
@option{-funroll-loops} for unrolling and @option{-ftree-vectorize} for
vectorization.
@unnumberedsec Aspect Iterable
@findex Iterable
@noindent
-PLEASE ADD DOCUMENTATION HERE???
+This aspect is used in the GNAT-defined formal container packages, to provide
+a light-weight mechanism for loops over such containers, without the overhead
+imposed by the tampering checks of standard Ada2012 iterators. The value of the
+aspect is a aggregate with four named components: First, Next, Has_Element,
+and Element. The following is a typical example of use:
+
+@smallexample @c ada
+type List is private with
+ Iterable => (First => First_Element,
+ Next => Advance,
+ Has_Element => Get_Element,
+ Element => List_Element);
+@end smallexample
+@itemize @bullet
+@item The value denoted by @code{First} must denote a primitive operation of
+the container type that returns a Cursor, which must a be a type declared in
+the container package.
+@item The value of @code{Next} is a primitive operation of the container type
+that takes a cursor and yields a cursor.
+@item @code{Has_Element} is an operation that applies to a cursor a yields an
+element of the container.
+@item @code{Element} is the type of the elements of the container type, and
+thus the result of the function denoted by Has_Element.
+@end itemize
@node Aspect Linker_Section
@unnumberedsec Aspect Linker_Section
@unnumberedsec Attribute Iterable
@findex Iterable
@noindent
-PLEASE ADD DOCUMENTATION HERE???
+Equivalent to Aspect Iterable.
@node Attribute Large
@unnumberedsec Attribute Large
@itemize @bullet
@item
the complexity introduced by control
-statements only, without taking into account short-circuit forms,
+statements only, without taking into account short-circuit forms
+(referred as @code{statement complexity} in @command{gnatmetric} output),
@item
-the complexity introduced by short-circuit control forms only, and
+the complexity introduced by short-circuit control forms only
+(referred as @code{expression complexity} in @command{gnatmetric} output), and
@item
the total
-cyclomatic complexity, which is the sum of these two values.
+cyclomatic complexity, which is the sum of these two values
+(referred as @code{cyclomatic complexity} in @command{gnatmetric} output).
@end itemize
@noindent
@item --tests-root=@var{dirname}
@cindex @option{--tests-root} (@command{gnattest})
-The directory hierarchy of tested sources is recreated in the @var{dirname}
-directory, and test packages are placed in corresponding directories.
+The hierarchy of source directories, if any, is recreated in the @var{dirname}
+directory, with test packages placed in directories corresponding to those of the sources.
If the @var{dirname} is a relative path, it is considered relative to the object
directory of the project file. When all sources from all projects are taken
recursively from all projects, directory hierarchies of tested sources are
@item --subdir=@var{dirname}
@cindex @option{--subdir} (@command{gnattest})
-Test packages are placed in subdirectories.
+Test packages are placed in a subdirectory of the corresponding source directory,
+with the name @var{dirname}. Thus, each set of unit tests is located in a subdirectory of the
+code under test. If the sources are in separate directories, each source directory
+has a test subdirectory named @var{dirname}.
@item --tests-dir=@var{dirname}
@cindex @option{--tests-dir} (@command{gnattest})
** a number of non-POSIX but useful/required features.
**/
-#if defined (__linux__) && !defined (_XOPEN_SOURCE)
-/* For Linux, define _XOPEN_SOURCE to get IOV_MAX */
-#define _XOPEN_SOURCE 500
-#endif
+#if defined (__linux__)
+
+/* Define _XOPEN_SOURCE to get IOV_MAX */
+# if !defined (_XOPEN_SOURCE)
+# define _XOPEN_SOURCE 500
+# endif
+
+/* Define _BSD_SOURCE to get CRTSCTS */
+# define _BSD_SOURCE
+
+#endif /* defined (__linux__) */
/* Include gsocket.h before any system header so it can redefine FD_SETSIZE */
Hint := First (Pragma_Argument_Associations (N));
while Present (Hint) loop
Check_Arg_Is_One_Of (Hint, Name_Ivdep,
- Name_No_Unroll, Name_Unroll, Name_No_Vector, Name_Vector);
+ Name_No_Unroll,
+ Name_Unroll,
+ Name_No_Vector,
+ Name_Vector);
Next (Hint);
end loop;