This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/25161] [4.0/4.1/4.2 Regression] Internal compiler error (segfault) instead of error message



------- Comment #5 from steven at gcc dot gnu dot org  2006-01-08 15:05 -------
Created an attachment (id=10594)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10594&action=view)
Robustify

Ideally we would be able to reject (int)&a as non-constant and therefore
illegal because the storage size of buf isn't constant.  Unfortunately we do
this in finish_decl, which is not called after the point where we fail now.

My hack-around is to deal with label_context_stack_vm==NULL in more places. 
Sadly I have no idea what this variable is for, and Joseph did not add any
comment or documentation of any form for these global variables.
(Ironic: the people who always rightly point out that people should document
what they are doing sometimes fail to document their own work :-)

If there is a way to reject this non-constant _before_ we call
c_begin_vm_scope, that would be the "right" fix AFAICT.


-- 


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]