sem_prag.adb
1.09 MB
The source could not be displayed because it is larger than 1 MB.
You can
load it anyway or download it
instead.
When a named number is used in Global/Depends contracts as global item, the error message could be confusing to users new to Ada. Now the message explains that named numbers are not objects. For instance on the following illegal code snippet: $ gcc -c bad_global.ads 1. package Bad_Global is 2. 3. X : constant := 1; 4. Y : constant := 1.0; 5. 6. procedure P with 7. Global => (Input => X, | >>> global item must denote object, state or current instance of concurrent type >>> named number "X" is not an object 8. In_Out => Y); | >>> global item must denote object, state or current instance of concurrent type >>> named number "Y" is not an object 9. 10. end Bad_Global; 2018-12-11 Yannick Moy <moy@adacore.com> gcc/ada/ * sem_prag.adb (Analyze_Global_Item): Refine error message. From-SVN: r267011