Changeset d3cf623


Ignore:
Timestamp:
Dec 20, 2024, 10:52:16 AM (9 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
b05d79d
Parents:
df91e15
Message:

Solved the requested warning with exceptions. Also went through the exceptions tests and managed to remove about 2/3rds of them from the lax list that now either didn't have any warnings or warnings because of the test itself.

Files:
16 edited

Legend:

Unmodified
Added
Removed
  • src/Virtual/Tables.cpp

    rdf91e15 rd3cf623  
    175175                { new ast::ObjectDecl(
    176176                        location,
    177                         "__unused",
     177                        /* The parameter only exists to provide a type id. */ "",
    178178                        new ast::PointerType( exceptType )
    179179                ) },
  • tests/Makefile.am

    rdf91e15 rd3cf623  
    186186        enum_tests/planet \
    187187        enum_tests/structEnum \
    188         exceptions/cancel/coroutine \
    189         exceptions/cancel/thread \
    190188        exceptions/cardgame \
    191         exceptions/conditional \
    192         exceptions/conditional-threads \
    193         exceptions/cor_resumer \
    194         exceptions/data-except \
    195189        exceptions/defaults \
    196190        exceptions/defaults-threads \
    197         exceptions/fibonacci_nonlocal \
    198         exceptions/finally \
    199         exceptions/finally-threads \
    200191        exceptions/hotpotato \
    201192        exceptions/hotpotato_checked \
    202         exceptions/interact \
    203193        exceptions/pingpong_nonlocal \
    204194        exceptions/polymorphic \
    205         exceptions/resume \
    206         exceptions/resume-threads \
    207         exceptions/terminate \
    208         exceptions/terminate-threads \
    209         exceptions/trash \
    210195        exceptions/try-leave-catch \
    211         exceptions/virtual-cast \
    212196        exceptions/virtual-poly \
    213197        expression \
  • tests/exceptions/cancel/coroutine.cfa

    rdf91e15 rd3cf623  
    99coroutine WillCancel {};
    1010
    11 const char * msg(CoroutineCancelled(WillCancel) * this) {
     11const char * msg(CoroutineCancelled(WillCancel) *) {
    1212        return "CoroutineCancelled(WillCancel)";
    1313}
    1414
    15 void main(WillCancel & wc) {
     15void main(WillCancel &) {
    1616        sout | '1';
    1717        cancel_stack((internal_error){&internal_vt});
     
    1919}
    2020
    21 int main(int argc, char * argv[]) {
     21int main() {
    2222        sout | nlOff;
    2323        WillCancel cancel;
  • tests/exceptions/cancel/thread.cfa

    rdf91e15 rd3cf623  
    99thread WillCancel {};
    1010
    11 const char * msg(ThreadCancelled(WillCancel) * this) {
     11const char * msg(ThreadCancelled(WillCancel) *) {
    1212        return "ThreadCancelled(WillCancel)";
    1313}
     
    5252}
    5353
    54 int main(int argc, char * argv[]) {
     54int main() {
    5555        sout | nlOff;
    5656        explicit();
  • tests/exceptions/conditional.cfa

    rdf91e15 rd3cf623  
    1616}
    1717
    18 int main(int argc, char * argv[]) {
     18int main() {
    1919        num_error exc = {&num_error_vt, 2};
    2020
  • tests/exceptions/data-except.cfa

    rdf91e15 rd3cf623  
    1414}
    1515
    16 int main(int argc, char * argv[]) {
     16int main() {
    1717        paired except = {&paired_vt, 3, 13};
    1818
  • tests/exceptions/defaults.cfa

    rdf91e15 rd3cf623  
    106106}
    107107
    108 int main(int argc, char * argv[]) {
     108int main() {
    109109        log_test();
    110110        jump_test();
  • tests/exceptions/finally.cfa

    rdf91e15 rd3cf623  
    88vtable(myth) myth_vt;
    99
    10 int main(int argc, char * argv[]) {
     10int main() {
    1111        myth exc = {&myth_vt};
    1212
  • tests/exceptions/interact.cfa

    rdf91e15 rd3cf623  
    1010vtable(moon) moon_vt;
    1111
    12 int main(int argc, char * argv[]) {
     12int main() {
    1313        // Resume falls back to terminate.
    1414        try {
  • tests/exceptions/polymorphic.cfa

    rdf91e15 rd3cf623  
    5959}
    6060
    61 int main(int argc, char * argv[]) {
     61int main() {
    6262        proxy_test();
    6363        sout | nl;
  • tests/exceptions/resume.cfa

    rdf91e15 rd3cf623  
    1414void in_void(void);
    1515
    16 int main(int argc, char * argv[]) {
     16int main() {
    1717        yin a_yin = {&yin_vt};
    1818        yang a_yang = {&yang_vt};
  • tests/exceptions/terminate.cfa

    rdf91e15 rd3cf623  
    1414void in_void(void);
    1515
    16 int main(int argc, char * argv[]) {
     16int main() {
    1717        yin a_yin = {&yin_vt};
    1818        yang a_yang = {&yang_vt};
  • tests/exceptions/trash.cfa

    rdf91e15 rd3cf623  
    99vtable(yang) yang_vt;
    1010
    11 int main(int argc, char * argv[]) {
     11int main() {
    1212        try {
    1313                try {
  • tests/exceptions/try-ctrl-flow.cfa

    rdf91e15 rd3cf623  
    189189}
    190190
    191 void main() {
     191int main() {
    192192        // Should not compile.
    193193        return 1;
  • tests/exceptions/try-leave-catch.cfa

    rdf91e15 rd3cf623  
    5353}
    5454
    55 int main(int argc, char * argv[]) {
     55int main() {
    5656        test_loop();
    5757        test_switch();
  • tests/exceptions/virtual-cast.cfa

    rdf91e15 rd3cf623  
    9393}
    9494
    95 int main (int argc, char * argv[]) {
    96 
     95int main() {
    9796        gamma * tri = malloc(); tri->virtual_table = &_gamma_vtable_instance;
    9897        beta * mid = (virtual beta *)tri;
Note: See TracChangeset for help on using the changeset viewer.