MantisBT - Z.C++
View Issue Details
0000019Z.C++[All Projects] Backend/Corepublic2011-01-11 10:582011-01-23 02:09
zaimoni 
zaimoni 
highmajorN/A
resolvedfixed 
 
0.0.70.0.7 
0000019: const/volatile enum test case suite
actually exercise declaring const/volatile enum-typed variables. This does imply building out the backend support for them.
No tags attached.
Issue History
2011-01-11 10:58zaimoniNew Issue
2011-01-11 10:58zaimoniStatusnew => assigned
2011-01-11 10:58zaimoniAssigned To => zaimoni
2011-01-20 22:08zaimoniNote Added: 0000005
2011-01-22 01:46zaimoniNote Added: 0000006
2011-01-22 01:47zaimoniNote Edited: 0000006bug_revision_view_page.php?bugnote_id=0000006#r4
2011-01-22 07:13zaimoniNote Edited: 0000005bug_revision_view_page.php?bugnote_id=0000005#r6
2011-01-22 07:43zaimoniNote Added: 0000007
2011-01-22 19:54zaimoniNote Added: 0000008
2011-01-22 20:10zaimoniNote Added: 0000009
2011-01-22 21:15zaimoniNote Edited: 0000009bug_revision_view_page.php?bugnote_id=0000009#r8
2011-01-22 21:17zaimoniNote Edited: 0000005bug_revision_view_page.php?bugnote_id=0000005#r9
2011-01-23 02:09zaimoniNote Added: 0000011
2011-01-23 02:09zaimoniStatusassigned => resolved
2011-01-23 02:09zaimoniFixed in Version => 0.0.7
2011-01-23 02:09zaimoniResolutionopen => fixed

Notes
(0000005)
zaimoni   
2011-01-20 22:08   
(edited on: 2011-01-22 21:17)
Augmentation targets:
* Pass_enum_def.in (then regenerate and update) [done]
* new file Pass_enum_def2.hpp to test depth-1 namespaces
* warnings and errors as needed

exhaustive-check:
* Pass: ringing changes on extern [const] [volatile] [done]
* Pass: ringing changes on uninitialized static [volatile] [done]
** handle use of uninitialized data during program flow analysis
* Error: uninitialized static const (no defined way to modify to a valid state with a trivial constructor), downgrade to warning with --pedantic as this is legal but useless
** deferred. Proper initializer parsing isn't going to happen in time.
* note default linkage issues...plain const uninitialized is fine with default-extern, but an error with default-static. Definitely a cross-language compatibility warning when legal.

(0000006)
zaimoni   
2011-01-22 01:46   
(edited on: 2011-01-22 01:47)
static/extern testing dies on extern good_test x1;
=====
C:\CPP_App\Z.C++\tests\zcc.in\decl.C99>..\..\..\zcc Pass_enum_def.h
Pass_enum_def.h:10: error: declaration disoriented by missing , (C99 6.7p1)
Pass_enum_def.h:10: error: declarator missing (C99 6.7p1)
void parse_tree::DeleteNSlotsAt(size_t, size_t) [with unsigned int arg_idx = 0u]

ParseTree.hpp:237
0<n

C:\CPP_App\Z.C++\tests\zcc.in\decl.C99>..\..\..\zcc Pass_enum_def.hpp
Pass_enum_def.hpp:10: error: declaration disoriented by missing , (C++98 7p1)
Pass_enum_def.hpp:10: error: declarator missing (C++98 7p1)
void parse_tree::DeleteNSlotsAt(size_t, size_t) [with unsigned int arg_idx = 0u]

ParseTree.hpp:237
0<n

(0000007)
zaimoni   
2011-01-22 07:43   
New file Error_enum_runon_def.in in tests/zcc.in/decl.C99 . Gives us test coverage for an error case.
(0000008)
zaimoni   
2011-01-22 19:54   
static const uninitialized is recoverable using const_cast -- so just warn?
(0000009)
zaimoni   
2011-01-22 20:10   
(edited on: 2011-01-22 21:15)
new files planned: Warn_enum_static_const.in, Warn_enum_static_const2.in .

[Except...we don't have good initializer support set so would have problems *not* warning in the initialized case.]

(0000011)
zaimoni   
2011-01-23 02:09   
deferring static const tests to when the parser is caught up.