[Bug c/18740] Execution-time sizeof drops side effects

2006-06-04 Thread jsm28 at gcc dot gnu dot org


--- Comment #8 from jsm28 at gcc dot gnu dot org  2006-06-04 17:01 ---
Fixed for 4.2.


-- 

jsm28 at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.2.0


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



[Bug c/18740] Execution-time sizeof drops side effects

2006-05-18 Thread mrs at gcc dot gnu dot org


--- Comment #7 from mrs at gcc dot gnu dot org  2006-05-18 18:22 ---
Subject: Bug 18740

Author: mrs
Date: Thu May 18 18:22:12 2006
New Revision: 113888

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=113888
Log:
Fix up vla, vm and [*] sematics.

PR c/18740
PR c/7948
PR c/25802
* c-tree.h (struct c_arg_info): Add had_vla_unspec.
(c_vla_unspec_p): Add.
(c_vla_type_p): Add.
* c-decl.c (struct c_scope): Add had_vla_unspec.
(build_array_declarator): Add support for [*].
(grokdeclarator): Likewise.
(grokparms): Likewise.
(get_parm_info): Likewise.
* c-objc-common.c (c_vla_unspec_p): Likewise.
* c-objc-common.h (LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P): Likewise.
* c-parser.c (c_parser_typeof_specifier): Evaluate arguments to
typeof when argument is a variably modified type not inside sizeof or
alignof.
(c_parser_direct_declarator_inner): Propagate errors.
(c_parser_sizeof_expression): Add support for [*].
* c-typeck.c (c_vla_type_p): Add.
(composite_type): Add support for vla compositing.
(comptypes_internal): Add support for vla compatibility.
(c_expr_sizeof_expr): Evaluate vla arguments.
* tree.c (variably_modified_type_p): Update comment for [*].

testsuite:
* gcc.dg/c90-arraydecl-1.c: Update for vla, vm [*] fixups.
* gcc.dg/vla-4.c: Add.
* gcc.dg/vla-5.c: Add.
* gcc.dg/vla-6.c: Add.

Added:
trunk/gcc/testsuite/gcc.dg/vla-4.c
trunk/gcc/testsuite/gcc.dg/vla-5.c
trunk/gcc/testsuite/gcc.dg/vla-6.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-decl.c
trunk/gcc/c-objc-common.c
trunk/gcc/c-objc-common.h
trunk/gcc/c-parser.c
trunk/gcc/c-tree.h
trunk/gcc/c-typeck.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/c90-arraydecl-1.c
trunk/gcc/tree.c


-- 


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



[Bug c/18740] Execution-time sizeof drops side effects

2006-05-08 Thread mrs at apple dot com


--- Comment #6 from mrs at apple dot com  2006-05-09 00:47 ---
I have a fix for this.


-- 


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



[Bug c/18740] Execution-time sizeof drops side effects

2005-02-12 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

 Status|REOPENED|NEW


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


[Bug c/18740] Execution-time sizeof drops side effects

2004-12-21 Thread ebotcazou at gcc dot gnu dot org

--- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-12-21 
11:15 ---
Reproducible on x86 and x86-64.


-- 
   What|Removed |Added

  GCC build triplet|sparc-sun-solaris2.8|*-*-*
   GCC host triplet|sparc-sun-solaris2.8|*-*-*
 GCC target triplet|sparc-sun-solaris2.8|*-*-*


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


[Bug c/18740] Execution-time sizeof drops side effects

2004-12-21 Thread rth at gcc dot gnu dot org

--- Additional Comments From rth at gcc dot gnu dot org  2004-12-21 13:39 
---
Not a bug.  Sizeof *never* has side effects.

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


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


[Bug c/18740] Execution-time sizeof drops side effects

2004-12-21 Thread rth at gcc dot gnu dot org

--- Additional Comments From rth at gcc dot gnu dot org  2004-12-21 13:43 
---
I'm wrong.  What a stupid thing to do to the C language.
Someone should be smacked.

-- 
   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |


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


[Bug c/18740] Execution-time sizeof drops side effects

2004-11-30 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

   Keywords||wrong-code


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


[Bug c/18740] Execution-time sizeof drops side effects

2004-11-30 Thread jsm28 at gcc dot gnu dot org


-- 
   What|Removed |Added

 CC||jsm28 at gcc dot gnu dot org
OtherBugsDependingO||16989
  nThis||
 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Last reconfirmed|-00-00 00:00:00 |2004-12-01 01:44:07
   date||


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