public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/15611] Invalid program not detected, RM 3.7(11)
       [not found] <bug-15611-4@http.gcc.gnu.org/bugzilla/>
@ 2011-08-30 23:37 ` nicolas.boulenguez at free dot fr
  2011-08-31  7:06 ` charlet at gcc dot gnu.org
  1 sibling, 0 replies; 9+ messages in thread
From: nicolas.boulenguez at free dot fr @ 2011-08-30 23:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15611

nicolas.boulenguez at free dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nicolas.boulenguez at free
                   |                            |dot fr

--- Comment #6 from nicolas.boulenguez at free dot fr 2011-08-30 23:33:54 UTC ---
Fixed in 4.6.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ada/15611] Invalid program not detected, RM 3.7(11)
       [not found] <bug-15611-4@http.gcc.gnu.org/bugzilla/>
  2011-08-30 23:37 ` [Bug ada/15611] Invalid program not detected, RM 3.7(11) nicolas.boulenguez at free dot fr
@ 2011-08-31  7:06 ` charlet at gcc dot gnu.org
  1 sibling, 0 replies; 9+ messages in thread
From: charlet at gcc dot gnu.org @ 2011-08-31  7:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15611

Arnaud Charlet <charlet at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |charlet at gcc dot gnu.org
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.1

--- Comment #7 from Arnaud Charlet <charlet at gcc dot gnu.org> 2011-08-31 07:04:21 UTC ---
Closing then:

$ gcc -c test_244943.ads
test_244943.ads:4:26: discriminants of tagged type cannot have defaults


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ada/15611] Invalid program not detected, RM 3.7(11)
       [not found] <bug-15611-286@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2007-12-13 13:57 ` sam at gcc dot gnu dot org
@ 2009-08-06 20:29 ` ludovic at ludovic-brenta dot org
  3 siblings, 0 replies; 9+ messages in thread
From: ludovic at ludovic-brenta dot org @ 2009-08-06 20:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ludovic at ludovic-brenta dot org  2009-08-06 20:29 -------
Confirmed on 4.4.1.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15611


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ada/15611] Invalid program not detected, RM 3.7(11)
       [not found] <bug-15611-286@http.gcc.gnu.org/bugzilla/>
  2007-11-26 20:46 ` sam at gcc dot gnu dot org
  2007-11-30 21:51 ` ludovic at ludovic-brenta dot org
@ 2007-12-13 13:57 ` sam at gcc dot gnu dot org
  2009-08-06 20:29 ` ludovic at ludovic-brenta dot org
  3 siblings, 0 replies; 9+ messages in thread
From: sam at gcc dot gnu dot org @ 2007-12-13 13:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from sam at gcc dot gnu dot org  2007-12-13 13:57 -------
Confirmed on 4.3.0 20071213


-- 

sam at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2005-06-14 04:52:49         |2007-12-13 13:57:22
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15611


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ada/15611] Invalid program not detected, RM 3.7(11)
       [not found] <bug-15611-286@http.gcc.gnu.org/bugzilla/>
  2007-11-26 20:46 ` sam at gcc dot gnu dot org
@ 2007-11-30 21:51 ` ludovic at ludovic-brenta dot org
  2007-12-13 13:57 ` sam at gcc dot gnu dot org
  2009-08-06 20:29 ` ludovic at ludovic-brenta dot org
  3 siblings, 0 replies; 9+ messages in thread
From: ludovic at ludovic-brenta dot org @ 2007-11-30 21:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ludovic at ludovic-brenta dot org  2007-11-30 21:51 -------
7.3(15) says that a private type has a partial view and a full view, and the
properties of the partial view apply in some places, and the properties of the
full view apply in other places.  So in places where the full view applies, the
type is considered tagged, and cannot have default expressions in the
known_discriminant part.

You seem to imply that the full view does not apply in the completion of the
type, as the full view does not even exist yet.  Taking the RM literally, you
may be right but the annotated AARM 3.7(11.b/2) provides guidance:

   Defaults for discriminants of tagged types are disallowed so that
   every object of a tagged type is constrained, either by an explicit
   constraint, or by its initial discriminant values. This substantially
   simplifies the semantic rules and the implementation of inherited
   dispatching operations. For generic formal types, the restriction
   simplifies the type matching rules. If one simply wants a "default"
   value for the discriminants, a constrained subtype can be declared for
   future use.

I think this rule would be violated for objects of the type declared in the
private part where the full view applies, i.e. you could declare unconstrained
objects of the tagged type.

So, I confirm this to be a bug.


-- 

ludovic at ludovic-brenta dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15611


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ada/15611] Invalid program not detected, RM 3.7(11)
       [not found] <bug-15611-286@http.gcc.gnu.org/bugzilla/>
@ 2007-11-26 20:46 ` sam at gcc dot gnu dot org
  2007-11-30 21:51 ` ludovic at ludovic-brenta dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: sam at gcc dot gnu dot org @ 2007-11-26 20:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sam at gcc dot gnu dot org  2007-11-26 20:46 -------
Ludovic,

are you sure that this applies when a tagged type is used as a completion of a
private type with discriminants having default expressions?

This case is handled specially in GNAT sources. sem_ch3.adb reads:

            --  Tagged types cannot have defaulted discriminants, but a
            --  non-tagged private type with defaulted discriminants
            --   can have a tagged completion.


-- 

sam at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gcc dot gnu dot org
             Status|NEW                         |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15611


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ada/15611] Invalid program not detected, RM 3.7(11)
  2004-05-23 23:42 [Bug ada/15611] New: Illegal " ludovic dot brenta at insalien dot org
  2004-05-24  1:20 ` [Bug ada/15611] Invalid " pinskia at gcc dot gnu dot org
  2004-10-29 13:43 ` pinskia at gcc dot gnu dot org
@ 2004-10-29 14:46 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-29 14:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-29 14:45 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-29 14:45:13
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15611


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ada/15611] Invalid program not detected, RM 3.7(11)
  2004-05-23 23:42 [Bug ada/15611] New: Illegal " ludovic dot brenta at insalien dot org
  2004-05-24  1:20 ` [Bug ada/15611] Invalid " pinskia at gcc dot gnu dot org
@ 2004-10-29 13:43 ` pinskia at gcc dot gnu dot org
  2004-10-29 14:46 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-29 13:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15611


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug ada/15611] Invalid program not detected, RM 3.7(11)
  2004-05-23 23:42 [Bug ada/15611] New: Illegal " ludovic dot brenta at insalien dot org
@ 2004-05-24  1:20 ` pinskia at gcc dot gnu dot org
  2004-10-29 13:43 ` pinskia at gcc dot gnu dot org
  2004-10-29 14:46 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24  1:20 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
            Summary|Illegal program not         |Invalid program not
                   |detected, RM 3.7(11)        |detected, RM 3.7(11)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15611


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-08-31  7:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-15611-4@http.gcc.gnu.org/bugzilla/>
2011-08-30 23:37 ` [Bug ada/15611] Invalid program not detected, RM 3.7(11) nicolas.boulenguez at free dot fr
2011-08-31  7:06 ` charlet at gcc dot gnu.org
     [not found] <bug-15611-286@http.gcc.gnu.org/bugzilla/>
2007-11-26 20:46 ` sam at gcc dot gnu dot org
2007-11-30 21:51 ` ludovic at ludovic-brenta dot org
2007-12-13 13:57 ` sam at gcc dot gnu dot org
2009-08-06 20:29 ` ludovic at ludovic-brenta dot org
2004-05-23 23:42 [Bug ada/15611] New: Illegal " ludovic dot brenta at insalien dot org
2004-05-24  1:20 ` [Bug ada/15611] Invalid " pinskia at gcc dot gnu dot org
2004-10-29 13:43 ` pinskia at gcc dot gnu dot org
2004-10-29 14:46 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).