public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c/25802] New: VM types of external and internal linkage variables not diagnosed @ 2006-01-16 0:32 jsm28 at gcc dot gnu dot org 2006-01-16 1:19 ` [Bug c/25802] " pinskia at gcc dot gnu dot org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: jsm28 at gcc dot gnu dot org @ 2006-01-16 0:32 UTC (permalink / raw) To: gcc-bugs GCC doesn't diagnose function-scope VM declarations of variables with external or internal linkage. (VM declarations of function-local statics are OK.) Four tests (all should be rejected unconditionally, none are even with -std=c99 -pedantic-errors): extern int (*a)[]; void f(int b) { extern int (*a)[b]; } static int (*a)[]; void f(int b) { extern int (*a)[b]; } extern int (*a)[]; void f(int b) { typedef int (*T)[b]; extern T a; } static int (*a)[]; void f(int b) { typedef int (*T)[b]; extern T a; } -- Summary: VM types of external and internal linkage variables not diagnosed Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jsm28 at gcc dot gnu dot org OtherBugsDependingO 16989 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25802 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/25802] VM types of external and internal linkage variables not diagnosed 2006-01-16 0:32 [Bug c/25802] New: VM types of external and internal linkage variables not diagnosed jsm28 at gcc dot gnu dot org @ 2006-01-16 1:19 ` pinskia at gcc dot gnu dot org 2006-05-06 21:24 ` mrs at apple dot com ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2006-01-16 1:19 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from pinskia at gcc dot gnu dot org 2006-01-16 01:19 ------- Confirmed. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-01-16 01:19:09 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25802 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/25802] VM types of external and internal linkage variables not diagnosed 2006-01-16 0:32 [Bug c/25802] New: VM types of external and internal linkage variables not diagnosed jsm28 at gcc dot gnu dot org 2006-01-16 1:19 ` [Bug c/25802] " pinskia at gcc dot gnu dot org @ 2006-05-06 21:24 ` mrs at apple dot com 2006-05-18 18:22 ` mrs at gcc dot gnu dot org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: mrs at apple dot com @ 2006-05-06 21:24 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from mrs at apple dot com 2006-05-06 21:24 ------- I have a fix for this, will post. -- mrs at apple dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mrs at apple dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25802 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/25802] VM types of external and internal linkage variables not diagnosed 2006-01-16 0:32 [Bug c/25802] New: VM types of external and internal linkage variables not diagnosed jsm28 at gcc dot gnu dot org 2006-01-16 1:19 ` [Bug c/25802] " pinskia at gcc dot gnu dot org 2006-05-06 21:24 ` mrs at apple dot com @ 2006-05-18 18:22 ` mrs at gcc dot gnu dot org 2006-05-18 19:29 ` mrs at apple dot com ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: mrs at gcc dot gnu dot org @ 2006-05-18 18:22 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from mrs at gcc dot gnu dot org 2006-05-18 18:22 ------- Subject: Bug 25802 Author: mrs Date: Thu May 18 18:22:12 2006 New Revision: 113888 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=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=25802 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/25802] VM types of external and internal linkage variables not diagnosed 2006-01-16 0:32 [Bug c/25802] New: VM types of external and internal linkage variables not diagnosed jsm28 at gcc dot gnu dot org ` (2 preceding siblings ...) 2006-05-18 18:22 ` mrs at gcc dot gnu dot org @ 2006-05-18 19:29 ` mrs at apple dot com 2006-06-04 17:03 ` jsm28 at gcc dot gnu dot org 2006-09-19 3:33 ` pinskia at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: mrs at apple dot com @ 2006-05-18 19:29 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from mrs at apple dot com 2006-05-18 19:29 ------- aka radr://4336222 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25802 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/25802] VM types of external and internal linkage variables not diagnosed 2006-01-16 0:32 [Bug c/25802] New: VM types of external and internal linkage variables not diagnosed jsm28 at gcc dot gnu dot org ` (3 preceding siblings ...) 2006-05-18 19:29 ` mrs at apple dot com @ 2006-06-04 17:03 ` jsm28 at gcc dot gnu dot org 2006-09-19 3:33 ` pinskia at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: jsm28 at gcc dot gnu dot org @ 2006-06-04 17:03 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from jsm28 at gcc dot gnu dot org 2006-06-04 17:03 ------- 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=25802 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/25802] VM types of external and internal linkage variables not diagnosed 2006-01-16 0:32 [Bug c/25802] New: VM types of external and internal linkage variables not diagnosed jsm28 at gcc dot gnu dot org ` (4 preceding siblings ...) 2006-06-04 17:03 ` jsm28 at gcc dot gnu dot org @ 2006-09-19 3:33 ` pinskia at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2006-09-19 3:33 UTC (permalink / raw) To: gcc-bugs ------- Comment #6 from pinskia at gcc dot gnu dot org 2006-09-19 03:33 ------- *** Bug 29126 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |neil at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25802 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-09-19 3:33 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-01-16 0:32 [Bug c/25802] New: VM types of external and internal linkage variables not diagnosed jsm28 at gcc dot gnu dot org 2006-01-16 1:19 ` [Bug c/25802] " pinskia at gcc dot gnu dot org 2006-05-06 21:24 ` mrs at apple dot com 2006-05-18 18:22 ` mrs at gcc dot gnu dot org 2006-05-18 19:29 ` mrs at apple dot com 2006-06-04 17:03 ` jsm28 at gcc dot gnu dot org 2006-09-19 3:33 ` 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).