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
|
|
|
|
New file Error_enum_runon_def.in in tests/zcc.in/decl.C99 . Gives us test coverage for an error case. |
|
|
|
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.]
|
|
|
|
deferring static const tests to when the parser is caught up. |
|