Project

General

Profile

Actions

Bug #7840

closed

-Wdeclaration-after-statement is valid for C/ObjC but not for C++

Added by Hanmac (Hans Mackowiak) about 11 years ago. Updated 6 months ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.0.0dev (2013-02-13 trunk 39224) [x86_64-linux]
[ruby-core:52204]
Tags:

Description

because of the new flags in warnflags i get this following errors:

cc1plus: warning: command line option '-Wdeclaration-after-statement' is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option '-Wimplicit-function-declaration' is valid for C/ObjC but not for C++ [enabled by default]

its because my gems are written in C++ and not in C, so i think this flags should not be used when the variable is used for both C and C++

Updated by ko1 (Koichi Sasada) about 11 years ago

  • Target version set to 2.6
  • Category set to build
  • Assignee set to nobu (Nobuyoshi Nakada)
Actions #2

Updated by naruse (Yui NARUSE) about 6 years ago

  • Target version deleted (2.6)

Updated by jeremyevans0 (Jeremy Evans) over 3 years ago

declaration-after-statement warnings were removed in ec336fb40e4df0c8615e584fbefb5e9e572cb9ec. implicit-function-declaration warnings are still present, though.

Updated by jeremyevans0 (Jeremy Evans) 6 months ago

  • Status changed from Open to Closed

Looking at recent Ruby versions:

  • -Wimplicit-function-declaration is in warnflags
  • warnflags is included in cflags
  • cflags is included in CFLAGS but not CXXFLAGS
  • C++ compilation rules use CXXFLAGS and not CFLAGS

So I think this problem has been resolved.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0