[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#453687: libc6-dev: bits/sched.h contains code that doesn't compile if -pedantic option to gcc is used



Package: libc6-dev
Version: 2.7-1
Severity: important


This code when saved as a cpp file fails to compile using g++ -pedantic:

    #include <sched.h>

    void fn() {
        cpu_set_t mask;
    
        CPU_SET(0, &mask);
    }

The error is:

# g++  -pedantic -c -o testsched.o testsched.cpp
testsched.cpp: In function ‘void fn()’:
testsched.cpp:6: error: ISO C++ forbids braced-groups within expressions

g++ version is:

# g++ --version
g++ (GCC) 4.2.3 20071123 (prerelease) (Debian 4.2.2-4)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.22-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libc6-dev depends on:
ii  li 2.7-1                                 GNU C Library: Shared libraries
ii  li 2.6.23-1~experimental.1~snapshot.9737 Linux Kernel Headers for developme

Versions of packages libc6-dev recommends:
ii  gcc [c-compiler]              4:4.2.1-6  The GNU C compiler
ii  gcc-3.3 [c-compiler]          1:3.3.6-15 The GNU C compiler
ii  gcc-4.1 [c-compiler]          4.1.2-17   The GNU C compiler
ii  gcc-4.2 [c-compiler]          4.2.2-4    The GNU C compiler

-- no debconf information




Reply to: