Issue Details (XML | Word | Printable)

Key: STDCXX-324
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Martin Sebor
Reporter: Martin Sebor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

std::div_t, std::ldiv_t missing members quot and rem

Created: 19/Jan/07 06:40 PM   Updated: 19/Jan/07 06:55 PM
Return to search
Component/s: 26. Numerics
Affects Version/s: 4.1.2, 4.1.3
Fix Version/s: 4.2.0

Time Tracking:
Not Specified

Environment: EDG eccp/Solaris

Resolved: 19/Jan/07 06:55 PM
Resolution Date: 19/Jan/07 06:55 PM


 Description  « Hide
The C standard(7.20.6.2, p3) requires the structs div_t and ldiv_t to contain the members quot and rem. We seem to be missing them:

$ cat t.cpp && make t
#include <cstdlib>

int main ()
{
const std::div_t x = { };
const std::ldiv_t y = { };

return x.quot + x.rem + y.quot + y.rem;
}

eccp -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include -I/build/sebor/eccp-3.8-11s/include -I/build/sebor/dev/stdlib/include/ansi -I/build/sebor/PlumHall/lvs06a/conform -I/build/sebor/PlumHall/lvs06a/dst.3 -A -x --template_directory=/build/sebor/eccp-3.8-11s/lib -g --display_error_number --remarks --diag_suppress 193,236,340,401,261,479,487,678,679,815 --diag_suppress 177,381,191,68,550,611,997,549 t.cpp
"t.cpp", line 8: error #135: class "std::div_t" has no member "quot"
return x.quot + x.rem + y.quot + y.rem;
^

"t.cpp", line 8: error #135: class "std::div_t" has no member "rem"
return x.quot + x.rem + y.quot + y.rem;
^

"t.cpp", line 8: error #135: class "std::ldiv_t" has no member "quot"
return x.quot + x.rem + y.quot + y.rem;
^

"t.cpp", line 8: error #135: class "std::ldiv_t" has no member "rem"
return x.quot + x.rem + y.quot + y.rem;
^

4 errors detected in the compilation of "t.cpp".
make: *** [t.o] Error 2



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.