Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Trilinos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 936
    • Issues 936
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • James Willenbring
  • Trilinos
  • Issues
  • #1524

Closed
Open
Created Jul 23, 2017 by James Willenbring@jmwilleMaintainer

g++ -Wconversion warnings

Created by: bradbell

Compiling a simple Sacado example using the -Wconversion flag with g++ yields many warnings.

Example 1: include/Teuchos_ScalarTraits.hpp:180:49: warning: conversion to ‘char’ from ‘int’ may alter its value [-Wconversion] static inline char random() { return std::rand(); } // RAB: This version should be used for an unsigned char, not char ~~~~~~~~~^~

Example 2: include/Teuchos_as.hpp:1318:27: warning: conversion to ‘double’ alters ‘long int’ constant value [-Wfloat-conversion] t < minVal || t > maxVal, ^

Kludge: Adding the following at the beginning of files that include triinos headers seems to work: # if COMPILER_IS_GNUCXX # pragma GCC diagnostic ignored "-Wfloat-conversion" # pragma GCC diagnostic ignored "-Wconversion" # endif

Assignee
Assign to
Time tracking