HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 2720 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 2720.


Report 2720 Actions


    Problem Report Number 2720
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0698
    Raised 2020-07-21 09:11
    Updated 2020-07-21 11:15
    Published 2020-07-21 11:15
    Product Standard Internationalised System Calls and Libraries Extended V3 (UNIX 03)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.7.18
    Test Identification /tset/XPG4.os/wprintpos/wcswidth/T.wcswidth (build)
    /tset/XPG4.os/wprintpos/wcwidth/T.wcwidth (build)
    Specification Base Definitions Issue 6
    Location in Spec pubs.opengroup.org/onlinepubs/009695399/functions/mbtowc.html
    ISO/IEC 9899:1999 Section 7.1.4
    Problem Summary Portions of the VSX4 test suite fail to compile.
    Problem Text When we build the VSX4 test suite (version 4.7.18 and earlier versions)
    it fails to compile. The
    compilation failures occur in two source files:

    /tset/XPG4.os/wprintpos/wcswidth/wcswidth.c
    /tset/XPG4.os/wprintpos/wcwidth/wcwidth.c

    In each of these files, the function mbtowc() is used. This function is
    declared in the header
    <stdlib.h>, as specified in
    https://pubs.opengroup.org/onlinepubs/009695399/functions/mbtowc.html.
    But the header file
    <stdlib.h> is not included in either of these source files. Our compiler
    issues the error

    error: implicit declaration of function 'mbtowc' is invalid in C99

    and fails to generate object files. This is consistent with the
    requirements of ISO/IEC 9899:1999.
    Adding the line

    #Include <stdlib.h>

    to each of these source files resolves the issue.
    Test Output From the VSX4 Build journal file:

    110|413 /tset/XPG4.os/wprintpos/wcswidth/T.wcswidth 12:08:55|Build
    Start, scenario ref 414-0
    15|413 3.6-lite 1|TCM Start
    400|413 0 1 12:08:55|IC Start
    200|413 1 12:08:55|TP Start
    520|413 1 00077421 1 1|c99 -
    I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/../../inc/tet3 -
    I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/INC -
    I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/SYSINC -D_XOPEN_SOURCE=600
    -
    DUNDEF_MACROS -D_XXXXXXXXXXXXXXXXXXXXXX=1 -c -o wcswidth.o
    wcswidth.c
    520|413 1 00077421 1 2|wcswidth.c:200:11: error: implicit declaration of
    function 'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    520|413 1 00077421 1 3| wccnt = mbtowc(wcp, (char *)
    cfg.width0[i], (size_t)MAXBYTES);
    520|413 1 00077421 1 4| ^
    520|413 1 00077421 1 5|wcswidth.c:228:11: error: implicit declaration of
    function 'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    520|413 1 00077421 1 6| wccnt = mbtowc(wcp, (char *)
    cfg.width1[i], (size_t)MAXBYTES);
    520|413 1 00077421 1 7| ^
    520|413 1 00077421 1 8|wcswidth.c:257:11: error: implicit declaration of
    function 'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    520|413 1 00077421 1 9| wccnt = mbtowc(wcp, (char *)
    cfg.width2[i], (size_t)MAXBYTES);
    520|413 1 00077421 1 10| ^
    520|413 1 00077421 1 11|wcswidth.c:288:11: error: implicit declaration
    of function 'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    520|413 1 00077421 1 12| wccnt = mbtowc(wcp, (char *)
    cfg.width3[i],
    (size_t)MAXBYTES);
    520|413 1 00077421 1 13| ^
    520|413 1 00077421 1 14|4 errors generated.
    520|413 1 00077421 1 15|make: *** [wcswidth.o] Error 1
    220|413 1 1 12:08:55|FAIL
    410|413 0 1 12:08:55|IC End
    130|413 0 12:08:56|Build End, scenario ref 414-0
    110|414 /tset/XPG4.os/wprintpos/wcwidth/T.wcwidth 12:08:56|Build Start,
    scenario ref 415-0
    15|414 3.6-lite 1|TCM Start
    400|414 0 1 12:08:56|IC Start
    200|414 1 12:08:56|TP Start
    520|414 1 00077437 1 1|c99 -
    I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/../../inc/tet3 -
    I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/INC -
    I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/SYSINC -D_XOPEN_SOURCE=600
    -
    DUNDEF_MACROS -D_XXXXXXXXXXXXXXXXXXXXXX=1 -c -o wcwidth.o wcwidth.c
    520|414 1 00077437 1 2|wcwidth.c:220:9: error: implicit declaration of
    function 'mbtowc' is invalid
    in C99 [-Werror,-Wimplicit-function-declaration]
    520|414 1 00077437 1 3| ret = mbtowc(&wc, (char *)
    cfg.width0[i], (size_t)MAXBYTES);
    520|414 1 00077437 1 4| ^
    520|414 1 00077437 1 5|wcwidth.c:251:9: error: implicit declaration of
    function 'mbtowc' is invalid
    in C99 [-Werror,-Wimplicit-function-declaration]
    520|414 1 00077437 1 6| ret = mbtowc(&wc, (char *)
    cfg.width1[i], (size_t)MAXBYTES);
    520|414 1 00077437 1 7| ^
    520|414 1 00077437 1 8|wcwidth.c:282:9: error: implicit declaration of
    function 'mbtowc' is invalid
    in C99 [-Werror,-Wimplicit-function-declaration]
    520|414 1 00077437 1 9| ret = mbtowc(&wc, (char *)
    cfg.width2[i], (size_t)MAXBYTES);
    520|414 1 00077437 1 10| ^
    520|414 1 00077437 1 11|wcwidth.c:313:9: error: implicit declaration of
    function 'mbtowc' is invalid
    in C99 [-Werror,-Wimplicit-function-declaration]
    520|414 1 00077437 1 12| ret = mbtowc(&wc, (char *)
    cfg.width3[i], (size_t)MAXBYTES);
    520|414 1 00077437 1 13| ^
    520|414 1 00077437 1 14|wcwidth.c:408:9: error: implicit declaration of
    function 'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    520|414 1 00077437 1 15| ret = mbtowc(&wc, (char *)
    cfg.iswcntrl[i], (size_t)MAXBYTES);
    520|414 1 00077437 1 16| ^
    520|414 1 00077437 1 17|5 errors generated.
    520|414 1 00077437 1 18|make: *** [wcwidth.o] Error 1
    220|414 1 1 12:08:56|FAIL
    410|414 0 1 12:08:56|IC End
    130|414 0 12:08:57|Build End, scenario ref 415-0


    From the build.rpt file:

    Test-Set Name: /tset/XPG4.os/wprintpos/wcswidth/T.wcswidth
    ----------------------------------------------------------

    Test-Set Results:
    ----------------

    Test-Set Started: 12:08:55

    Make Results:


    ************************************************************************
    /tset/XPG4.os/wprintpos/wcswidth/T.wcswidth Failed

    Make Information:
    c99 -
    I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/../../inc/tet3
    -I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/INC
    -I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/SYSINC
    -D_XOPEN_SOURCE=600 -DUNDEF_MACROS -
    D_XXXXXXXXXXXXXXXXXXXXX=1
    -c -o wcswidth.o wcswidth.c
    wcswidth.c:200:11: error: implicit declaration of function
    'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    wccnt = mbtowc(wcp, (char *) cfg.width0[i],
    (size_t)MAXBYTES);
    ^
    wcswidth.c:228:11: error: implicit declaration of function
    'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    wccnt = mbtowc(wcp, (char *) cfg.width1[i],
    (size_t)MAXBYTES);
    ^
    wcswidth.c:257:11: error: implicit declaration of function
    'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    wccnt = mbtowc(wcp, (char *) cfg.width2[i],
    (size_t)MAXBYTES);
    ^
    wcswidth.c:288:11: error: implicit declaration of function
    'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    wccnt = mbtowc(wcp, (char *) cfg.width3[i],
    (size_t)MAXBYTES);
    ^
    4 errors generated.
    make: *** [wcswidth.o] Error 1


    ************************************************************************

    Test-Set Ended: 12:08:56

    Test-Set Results Summary:
    ------------------------

    1 Makes Executed
    1 Makes Failed













    Test-Set Name: /tset/XPG4.os/wprintpos/wcwidth/T.wcwidth
    --------------------------------------------------------

    Test-Set Results:
    ----------------

    Test-Set Started: 12:08:56

    Make Results:


    ************************************************************************
    /tset/XPG4.os/wprintpos/wcwidth/T.wcwidth Failed

    Make Information:
    c99 -
    I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/../../inc/tet3
    -I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/INC
    -I/Volumes/_UC/ConformanceTesting/tet/vsx4/SRC/SYSINC
    -D_XOPEN_SOURCE=600 -DUNDEF_MACROS -
    D_XXXXXXXXXXXXXXXXXXXXXX=1
    -c -o wcwidth.o wcwidth.c
    wcwidth.c:220:9: error: implicit declaration of function
    'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    ret = mbtowc(&wc, (char *) cfg.width0[i],
    (size_t)MAXBYTES);
    ^
    wcwidth.c:251:9: error: implicit declaration of function
    'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    ret = mbtowc(&wc, (char *) cfg.width1[i],
    (size_t)MAXBYTES);
    ^
    wcwidth.c:282:9: error: implicit declaration of function
    'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    ret = mbtowc(&wc, (char *) cfg.width2[i],
    (size_t)MAXBYTES);
    ^
    wcwidth.c:313:9: error: implicit declaration of function
    'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    ret = mbtowc(&wc, (char *) cfg.width3[i],
    (size_t)MAXBYTES);
    ^
    wcwidth.c:408:9: error: implicit declaration of function
    'mbtowc' is
    invalid in C99 [-Werror,-Wimplicit-function-declaration]
    ret = mbtowc(&wc, (char *) cfg.iswcntrl[i],
    (size_t)MAXBYTES);
    ^
    5 errors generated.
    make: *** [wcwidth.o] Error 1


    ************************************************************************

    Test-Set Ended: 12:08:57

    Test-Set Results Summary:
    ------------------------


    1 Makes Executed
    1 Makes Failed

    Review Information

    Review Type TSMA Review
    Start Date 2020-07-21 09:11
    Last Updated 2020-07-21 10:32
    Completed 2020-07-21 10:32
    Status Complete
    Review Recommendation Rejected (REJ)
    Review Response This is accepted as a fault in the test suite. However, since it causes
    build failures it is not suitable for a TSD.

    There is also no need to issue a patch, since a simple work-around
    exists. The submitter should add the following lines to SRC/vsxconfig.h
    and then rerun the top-level make and tcc -b.

    /****** <wchar.h> - Missing elements ******/
    /****** Start of Definitions for file wchar.h ******/
    #include <stdlib.h>
    /****** End of Definitions for file wchar.h ******/

    It is recommended that this TSD request is rejected.

    Review Type SA Review
    Start Date 2020-07-21 18:32
    Last Updated 2020-07-21 11:14
    Completed 2020-07-21 11:14
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion This is accepted as a fault in the test suite. However, since it causes
    build failures it is not suitable for a TSD, and is therefore being rejected.

    The following work-around is authorized for use.

    The submitter should add the following lines to SRC/vsxconfig.h
    and then rerun the top-level make and tcc -b.


    /****** <wchar.h> - Missing elements ******/

    /****** Start of Definitions for file wchar.h ******/

    #include <stdlib.h>

    /****** End of Definitions for file wchar.h ******/

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority