]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR c++/65790 (compilation error : receive std::index_sequence)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
c7131fb2
AM
12015-07-07 Andrew MacLeod <amacleod@redhat.com>
2
3 * c-array-notation.c: Adjust includes.
4 * c-aux-info.c: Likewise.
5 * c-convert.c: Likewise.
6 * c-decl.c: Likewise.
7 * c-errors.c: Likewise.
8 * c-lang.c: Likewise.
9 * c-objc-common.c: Likewise.
10 * c-parser.c: Likewise.
11 * c-typeck.c: Likewise.
12
da2e71c9
MLI
132015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
14
15 PR fortran/66605
16 * c-decl.c (finish_function): Call do_warn_unused_parameter.
17
b155cfd9
MP
182015-06-29 Marek Polacek <polacek@redhat.com>
19
20 PR c/66322
21 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
22 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
23 about -Wswitch-bool here.
24 (do_case): Update c_add_case_label call.
25 (c_finish_case): Update c_do_switch_warnings call.
26
31521951
MP
272015-06-27 Marek Polacek <polacek@redhat.com>
28
29 * c-typeck.c: Use VECTOR_TYPE_P throughout.
30
22d03525
MP
312015-06-26 Marek Polacek <polacek@redhat.com>
32
33 * c-array-notation.c (fix_builtin_array_notation_fn): Use
34 INDIRECT_REF_P.
35 * c-typeck.c (array_to_pointer_conversion): Likewise.
36 (build_unary_op): Likewise.
37 (c_finish_return): Likewise.
38
f0889939
AM
392015-06-25 Andrew MacLeod <amacleod@redhat.com>
40
41 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
42 * c-parser.c: Likewise.
43
8d67ee55
RS
442015-06-25 Richard Sandiford <richard.sandiford@arm.com>
45
46 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
47 instead of pointer_hash.
48 (detect_field_duplicates): Likewise.
49
0ae9bd27
MP
502015-06-25 Marek Polacek <polacek@redhat.com>
51
52 * c-array-notation.c: Use VAR_P throughout.
53 * c-decl.c: Likewise.
54 * c-objc-common.c: Likewise.
55 * c-parser.c: Likewise.
56 * c-typeck.c: Likewise.
57
62f9079a
MP
582015-06-25 Marek Polacek <polacek@redhat.com>
59
60 * c-decl.c: Use is_global_var throughout.
61 * c-parser.c: Likewise.
62 * c-typeck.c: Likewise.
63
abb226c9
AM
642015-06-17 Andrew MacLeod <amacleod@redhat.com>
65
66 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
67 * c-aux-info.c: Likewise.
68 * c-convert.c: Likewise.
69 * c-decl.c: Likewise.
70 * c-errors.c: Likewise.
71 * c-lang.c: Likewise.
72 * c-objc-common.c: Likewise.
73 * c-parser.c: Likewise.
74 * c-typeck.c: Likewise.
75
8cbababc
JH
762015-06-11 Jan Hubicka <hubicka@ucw.cz>
77
78 PR middle-end/66325
79 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
80 variants.
81
a0349665
PMR
822015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
83
84 * c-decl.c (pop_scope): Register the main translation unit
85 through the new debug hook.
86
13fdf2e2
AM
872015-06-08 Andrew MacLeod <amacleod@redhat.com>
88
89 * c-array-notation.c : Adjust include files.
90 * c-aux-info.c : Likewise.
91 * c-convert.c : Likewise.
92 * c-decl.c : Likewise.
93 * c-errors.c : Likewise.
94 * c-lang.c : Likewise.
95 * c-lang.h : Likewise.
96 * c-objc-common.c : Likewise.
97 * c-parser.c : Likewise.
98 * c-typeck.c : Likewise.
99
d7438551
AH
1002015-06-05 Aldy Hernandez <aldyh@redhat.com>
101
102 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
103 immediately clobber it.
104 (c_write_global_declarations_1): Remove call to
105 check_global_declaration_1.
106 (c_write_global_declarations_2): Remove.
107 (c_write_final_cleanups): Rename from c_write_global_declarations.
108 Remove call to finalize_compilation_unit.
109 Remove calls to debugging hooks.
110 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
111 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
112 * c-tree.h: Remove c_write_global_declarations.
113
ecb9f223
AM
1142015-06-04 Andrew MacLeod <amacleod@redhat.com>
115
116 * c-array-notation.c: Adjust includes for restructured coretypes.h.
117 * c-aux-info.c: Likewise.
118 * c-convert.c: Likewise.
119 * c-decl.c: Likewise.
120 * c-errors.c: Likewise.
121 * c-lang.c: Likewise.
122 * c-objc-common.c: Likewise.
123 * c-parser.c: Likewise.
124 * c-typeck.c: Likewise.
125
9482b620
MP
1262015-06-04 Marek Polacek <polacek@redhat.com>
127
128 PR c/66341
129 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
130 it is a lvalue.
131
bc51ace3
PK
1322015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
133
134 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
135 Warn for empty struct.
136 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
137
ea5b45b6
AT
1382015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
139
140 * c-decl.c (start_function): Call plugin before parsing.
141 (finish_function): Call plugin after parsing.
142
c2d47482
PK
1432015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
144
145 PR c/49551
146 * c-decl.c (merge_decls): Merge DECL_COMMON.
147
a95492ab
JW
1482015-05-22 Jim Wilson <jim.wilson@linaro.org>
149
150 * Make-lang.in (check_gcc_pallelize): Define.
151
fd5c817a
MP
1522015-05-22 Marek Polacek <polacek@redhat.com>
153
154 PR c/47043
155 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
156 attributes.
157
c7b70a3c
MP
1582015-05-21 Marek Polacek <polacek@redhat.com>
159
160 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
161 DECL_BUILT_IN.
162
21b634ae
MP
1632015-05-20 Marek Polacek <polacek@redhat.com>
164
165 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
166 * c-typeck.c: Likewise.
167
296a8c2f
MP
1682015-05-19 Marek Polacek <polacek@redhat.com>
169
170 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
171
41b37d5e
JJ
1722015-05-19 Jakub Jelinek <jakub@redhat.com>
173
174 PR middle-end/66199
175 * c-parser.c (c_parser_omp_for_loop): Don't add
176 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
177 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
178 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
179 constructs.
180
fab27f52
MM
1812015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
182
183 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 184 swaps.
fab27f52 185
40de31cf
MLI
1862015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
187
188 PR fortran/44054
189 * c-objc-common.c (c_tree_printer): Replace locus pointer with
190 accessor function.
191
3aa3c9fc
MP
1922015-05-14 Marek Polacek <polacek@redhat.com>
193
194 PR c/66066
195 PR c/66127
196 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
197 rather than with 0.
198
c3388e62
DM
1992015-05-12 David Malcolm <dmalcolm@redhat.com>
200
201 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
202 to add a call to warn_for_misleading_indentation.
203 (c_parser_else_body): Likewise, adding param "else_loc".
204 (c_parser_if_statement): Check for misleading indentation.
205 (c_parser_while_statement): Likewise.
206 (c_parser_for_statement): Likewise.
207
755e528f
MP
2082015-05-08 Marek Polacek <polacek@redhat.com>
209
210 PR c/64918
211 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
212 (output_init_element): Likewise.
213
0173bd2a
MP
2142015-05-07 Marek Polacek <polacek@redhat.com>
215
216 PR c/65179
217 * c-typeck.c (build_binary_op): Warn when left shifting a negative
218 value.
219
9babc352
MP
2202015-04-30 Marek Polacek <polacek@redhat.com>
221
222 * c-typeck.c (set_init_label): Call error_at instead of error and
223 pass LOC to it.
224
ac9f18db
MP
225 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
226 the type of a decl.
227
ec3fba51
MP
228 * c-typeck.c (c_build_va_arg): Clarify the error message.
229
b811915d
TS
2302015-04-29 Thomas Schwinge <thomas@codesourcery.com>
231
232 * c-parser.c (c_parser_oacc_enter_exit_data): Use
233 OMP_STANDALONE_CLAUSES.
234
f3075008
MP
2352015-04-28 Marek Polacek <polacek@redhat.com>
236
237 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
238
4e81b788
MP
2392015-04-28 Marek Polacek <polacek@redhat.com>
240
241 PR c/65901
242 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
243
6c1db78e
MP
2442015-04-25 Marek Polacek <polacek@redhat.com>
245
246 PR c/52085
247 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
248 attribute.
249
5c4abbb8
MP
2502015-04-23 Marek Polacek <polacek@redhat.com>
251
252 PR c/65345
253 * c-decl.c (set_labels_context_r): New function.
254 (store_parm_decls): Call it via walk_tree_without_duplicates.
255 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
256 instead of create_tmp_var. Build TARGET_EXPR instead of
257 COMPOUND_EXPR.
258 (build_atomic_assign): Use create_tmp_var_raw instead of
259 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
260
06aca1d5
IV
2612015-04-20 Ilya Verbin <ilya.verbin@intel.com>
262
263 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
264 (c_parser_omp_target_update): Add missed %> to error_at ().
265
8fba1830
BRF
2662015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
267
268 PR target/55143
269 * c-decl.c (c_default_pointer_mode): Remove definition.
270 * c-tree.h (c_default_pointer_mode): Remove declaration.
271
62021f64
TB
2722015-03-27 Tobias Burnus <burnus@net-b.de>
273
274 PR c/65586
275 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
276 error out.
277 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
278 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
279 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
280
9b65e171
JJ
2812015-03-19 Jakub Jelinek <jakub@redhat.com>
282
283 * c-decl.c (c_decl_attributes): Also add "omp declare target"
284 attribute for DECL_EXTERNAL VAR_DECLs.
285
17958621
JJ
2862015-03-11 Jakub Jelinek <jakub@redhat.com>
287
288 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
289 argument.
290
7ccb1a11
JJ
2912015-03-10 Jakub Jelinek <jakub@redhat.com>
292
293 PR c/65120
294 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
295 before preparing arguments to warn_logical_not_parentheses.
296
01177669
JJ
2972015-03-09 Jakub Jelinek <jakub@redhat.com>
298
299 PR c/65120
300 * c-typeck.c (parser_build_binary_op): Don't warn for
301 !!x == y or !b == y where b is _Bool.
302
802ac282
MP
3032015-03-09 Marek Polacek <polacek@redhat.com>
304
305 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
306 * c-decl.c (grokdeclarator): Likewise.
307 * c-typeck.c (build_binary_op): Likewise.
308
e5165b60
MP
3092015-02-27 Marek Polacek <polacek@redhat.com>
310
311 PR c/65228
312 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
313
065d214c
MP
3142015-02-14 Marek Polacek <polacek@redhat.com>
315
316 PR c/64768
317 * c-decl.c (grokdeclarator): Set the range of a flexible array member
318 declared through a typedef name.
319
e5d9235b
MP
3202015-02-13 Marek Polacek <polacek@redhat.com>
321
322 PR c/65050
323 * c-decl.c (grokdeclarator): Print also the type when giving
324 the error message about array's incomplete element type.
325
fa01ffcc
JJ
3262015-02-11 Jakub Jelinek <jakub@redhat.com>
327
328 PR c/64824
329 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
330 check in the POP macro.
331
c3e38a03
MP
3322015-02-09 Marek Polacek <polacek@redhat.com>
333
334 PR c/64856
335 * c-typeck.c (process_init_element): Don't always wrap
336 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
337 initializing a range of elements.
338
4886ec8e
JJ
3392015-02-04 Jakub Jelinek <jakub@redhat.com>
340
341 PR c/64824
342 PR c/64868
343 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
344
c3e38a03 3452015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
346
347 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
348 processing enum declaration.
349
7b33f0c8
MP
3502015-01-29 Marek Polacek <polacek@redhat.com>
351
352 PR c/64709
353 * c-typeck.c (pop_init_level): If constructor_elements has
354 exactly one element with integer_zerop value, set constructor_zeroinit
355 to 1. Remove braces around warning_init call.
356
dea63e49
JJ
3572015-01-27 Jakub Jelinek <jakub@redhat.com>
358
359 PR c/64766
360 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
361 of FUNCTION_DECLs with error_mark_node.
362
d38f7dce
JJ
3632015-01-26 Jakub Jelinek <jakub@redhat.com>
364
365 PR c/64778
366 * c-typeck.c (convert_arguments): Return -1 if there are
367 error_args, even if we've diagnosed too many arguments.
368
cbf5d0e7
RB
3692015-01-21 Richard Biener <rguenther@suse.de>
370
371 PR middle-end/64313
372 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
373 for builtins the user declared correctly.
374
41dbbb37
TS
3752015-01-15 Thomas Schwinge <thomas@codesourcery.com>
376 Bernd Schmidt <bernds@codesourcery.com>
377 Cesar Philippidis <cesar@codesourcery.com>
378 James Norris <jnorris@codesourcery.com>
379 Jakub Jelinek <jakub@redhat.com>
380 Ilmir Usmanov <i.usmanov@samsung.com>
381
382 * c-parser.c: Include "gomp-constants.h".
383 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
384 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
385 Use OMP_CLAUSE_SET_MAP_KIND.
386 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
387 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
388 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
389 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
390 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
391 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
392 "copyout", "create", "delete", "deviceptr", "gang", "host",
393 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
394 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
395 "present_or_create", "pcreate", "seq", "self", "vector",
396 "vector_length", "wait", "worker".
397 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
398 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
399 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
400 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
401 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
402 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
403 (c_parser_oacc_data_clause_deviceptr)
404 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
405 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
406 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
407 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
408 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
409 (c_parser_oacc_parallel, c_parser_oacc_update)
410 (c_parser_oacc_wait): New functions.
411 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
412 (c_finish_oacc_data): New prototypes.
413 * c-typeck.c: Include "gomp-constants.h".
414 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
415 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
416 OMP_CLAUSE_SET_MAP_KIND.
417 (c_finish_oacc_parallel, c_finish_oacc_kernels)
418 (c_finish_oacc_data): New functions.
419 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
420 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
421 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
422 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
423 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
424 GOMP_MAP_FORCE_DEVICEPTR.
425
adfac8df
JJ
4262015-01-09 Michael Collison <michael.collison@linaro.org>
427
428 * c-array-notation.c: Include hash-set.h, machmode.h,
429 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
430 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
431 * c-aux-info.c: Ditto.
432 * c-convert.c: Ditto.
433 * c-decl.c: Ditto.
434 * c-errors.c: Ditto.
435 * c-lang.c: Dittoxs.
436 * c-objc-common.c: Ditto.
437 * c-parser.c: Ditto.
438 * c-typeck.c: Include hash-set.h, machmode.h,
439 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
440 fold-const.h, wide-int.h, inchash.h, real.h and
441 fixed-value.h due to flattening of tree.h.
442
2cc901dc
MP
4432015-01-07 Marek Polacek <polacek@redhat.com>
444
445 PR c/64417
446 * c-typeck.c (process_init_element): Disallow initialization of
447 a flexible array member with a string constant if the structure
448 is in an array.
449
5624e564
JJ
4502015-01-05 Jakub Jelinek <jakub@redhat.com>
451
e5341100
JJ
452 PR sanitizer/64344
453 * c-typeck.c (convert_for_assignment, c_finish_return): For
454 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
455 types also set in_late_binary_op around convert call.
456 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
457 to integral type casts, if not in_late_binary_op, pass c_fully_fold
458 result on expr as last argument to ubsan_instrument_float_cast,
459 if in_late_binary_op, don't use c_save_expr but save_expr.
460
5624e564
JJ
461 Update copyright years.
462
5bd012f8
MP
4632015-01-05 Marek Polacek <polacek@redhat.com>
464
465 PR c/64423
466 * c-typeck.c (build_array_ref): Pass loc down to
467 warn_array_subscript_with_type_char.
468
768952be
MU
4692014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
470
471 * c-typeck.c: New behavious for pointers to arrays with qualifiers
472 (common-pointer-type): For pointers to arrays take qualifiers from
473 element type.
474 (build_conditional_expr): Add warnings for lost qualifiers.
475 (comp-target-types): Allow pointers to arrays with different qualifiers.
476 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
477 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
478 to PEDWARN_FOR_QUALIFIERS.
479
8f94a8c4
JJ
4802014-12-17 Jakub Jelinek <jakub@redhat.com>
481
482 PR sanitizer/64289
483 * c-convert.c: Include ubsan.h.
484 (convert): For real -> integral casts and
485 -fsanitize=float-cast-overflow don't call convert_to_integer, but
486 instead instrument the float cast directly.
487
b731b390
JJ
4882014-11-29 Jakub Jelinek <jakub@redhat.com>
489
490 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
491 c_finish_stmt_expr): Remove NULL last argument from
492 create_tmp_var_raw and create_tmp_var calls.
493 * c-array-notation.c (fix_builtin_array_notation_fn,
494 build_array_notation_expr, fix_conditional_array_notations_1,
495 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
496
541e35a6
MP
4972014-11-28 Marek Polacek <polacek@redhat.com>
498
499 PR c/63862
500 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
501 convert the right operand to integer type.
502
b286be94
MP
5032014-11-25 Marek Polacek <polacek@redhat.com>
504
505 PR c/63877
506 * c-decl.c (start_function): Disable -Wmissing-declarations warning
507 for inline functions.
508
aa7da51a
JJ
5092014-11-21 Jakub Jelinek <jakub@redhat.com>
510
511 PR target/63764
512 * c-typeck.c (build_array_ref): Adjust
513 convert_vector_to_pointer_for_subscript caller. If it returns true,
514 call non_lvalue_loc on the result.
515
d876207f
RB
5162014-11-11 Richard Biener <rguenther@suse.de>
517
518 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
519 to true.
520
e5e44252
AK
5212014-11-10 Andi Kleen <ak@linux.intel.com>
522
523 PR c/60804
524 * c-parser.c (c_parser_statement_after_labels): Call
525 check_no_cilk.
526 (c_parser_if_statement): Dito.
527 (c_parser_switch_statement): Dito.
528 (c_parser_while_statement): Dito.
529 (c_parser_do_statement): Dito.
530 (c_parser_for_statement): Dito.
531 * c-typeck.c (c_finish_loop): Dito.
532
13c21655
PC
5332014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
534
535 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
536 OPT_Wshift_count_overflow in the warnings.
537
2d51fcef
MP
5382014-10-30 Marek Polacek <polacek@redhat.com>
539
540 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
541 print the stripped version as well, if they're not the same.
542
ef4bddc2
RS
5432014-10-29 Richard Sandiford <richard.sandiford@arm.com>
544
545 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
546 machine_mode.
547
c582198b
AM
5482014-10-28 Andrew MacLeod <amacleod@redhat.com>
549
550 * c-decl.c: Adjust include files.
551 * c-parser.c: Ditto.
552
ddc8de03
PM
5532014-10-27 Phil Muldoon <pmuldoon@redhat.com>
554 Tom Tromey <tromey@redhat.com>
555
556 * c-tree.h (enum c_oracle_request): New.
557 (c_binding_oracle_function): New typedef.
558 (c_binding_oracle, c_pushtag, c_bind): Declare.
559 * c-decl.c (c_binding_oracle): New global.
560 (I_SYMBOL_CHECKED): New macro.
561 (i_symbol_binding): New function.
562 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
563 (I_TAG_CHECKED): New macro.
564 (i_tag_binding): New function.
565 (I_TAG_BINDING, I_TAG_DECL): Redefine.
566 (I_LABEL_CHECKED): New macro.
567 (i_label_binding): New function.
568 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
569 (c_print_identifier): Save and restore c_binding_oracle.
570 (c_pushtag, c_bind): New functions.
571
60393bbc
AM
5722014-10-27 Andrew MacLeod <amacleod@redhat.com>
573
574 * c-typeck.c: Adjust include files.
575
d723bb7c
MLI
5762014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
577
578 PR c++/53061
579 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
580 initialization here...
581 (c_initialize_diagnostics): ... but here. Set defaults after
582 building pretty-printer.
583
1bc5a451
MP
5842014-10-23 Marek Polacek <polacek@redhat.com>
585
586 PR c/63626
587 * c-decl.c (pop_scope): Don't print warning in external_scope.
588
4435bb92
MP
5892014-10-19 Marek Polacek <polacek@redhat.com>
590
591 PR c/63567
592 * c-typeck.c (output_init_element): Allow initializing objects with
593 static storage duration with compound literals even in C99 and add
594 pedwarn for it.
595
7278465e
MP
5962014-10-17 Marek Polacek <polacek@redhat.com>
597
598 PR c/63567
599 * c-typeck.c (digest_init): Allow initializing objects with static
600 storage duration with compound literals even in C99 and add pedwarn
601 for it.
602
d9b7be2e
MP
6032014-10-17 Marek Polacek <polacek@redhat.com>
604
605 PR c/63543
606 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
607 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
608 error multiple times. Print the type.
609
f406ae1f
MP
6102014-10-17 Marek Polacek <polacek@redhat.com>
611
612 PR c/63549
613 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
614 type.
615
92574c7c
MP
6162014-10-17 Marek Polacek <polacek@redhat.com>
617
618 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
619 (start_function): Use OPT_Wimplicit_int instead of 0.
620 (store_parm_decls_oldstyle): Likewise.
621
1bc4a978
MT
6222014-10-17 Alan Modra <amodra@gmail.com>
623
624 PR middle-end/61848
625 * c-decl.c (merge_decls): Don't merge section name or tls model
626 to newdecl symtab node, instead merge to olddecl. Override
627 existing olddecl section name. Set tls_model for all thread-local
628 vars, not just OMP thread-private ones. Remove incorrect comment.
629
83685514
AM
6302014-10-16 Andrew MacLeod <amacleod@redhat.com>
631
632 * c-decl.c: Adjust include files.
633
78a7c317
DD
6342014-10-14 DJ Delorie <dj@redhat.com>
635
636 * c-parser.c (c_parse_init): Add RID entries for each __intN.
637 (c_token_starts_typename): Check all __intN, not just __int128.
638 (c_token_starts_declspecs): Likewise.
639 (c_parser_declspecs): Likewise.
640 (c_parser_attribute_any_word): Likewise.
641 (c_parser_objc_selector): Likewise.
642 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
643 (struct c_declspecs): Add int_n_idx field to record *which* __intN
644 is specified.
645 * c-decl.c (declspecs_add_type): Check for all __intN, not just
646 __int128.
647 (finish_declspecs): Likewise.
648
74d98c1e
AB
6492014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
650
651 * c-parser.c (c_parser_all_labels): New function to replace
652 the duplicate code.
653 (c_parser_statement): Call the new function.
654
84937de2
MP
6552014-10-09 Marek Polacek <polacek@redhat.com>
656
657 PR c/63480
658 * c-typeck.c (pop_init_level): Don't warn about initializing
659 with { }.
660
0382aaa0
MP
6612014-10-07 Marek Polacek <polacek@redhat.com>
662
663 PR c/59717
664 * c-decl.c (header_for_builtin_fn): New function.
665 (implicitly_declare): Suggest which header to include.
666
7a0ca710
MP
6672014-10-07 Marek Polacek <polacek@redhat.com>
668
669 * c-convert.c (convert): Use error_operand_p.
670 * c-typeck.c (require_complete_type): Likewise.
671 (really_atomic_lvalue): Likewise.
672 (digest_init): Likewise.
673 (handle_omp_array_sections_1): Likewise.
674
6bc8a126
MP
6752014-10-03 Marek Polacek <polacek@redhat.com>
676
677 PR c/63453
678 * c-decl.c (pop_scope): Don't warn about "inline function declared
679 but never defined" for functions marked with gnu_inline attribute.
680
d90c0a59
JJ
6812014-09-25 Jakub Jelinek <jakub@redhat.com>
682
683 PR c++/63249
684 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
685 on low_bound and length.
686
083e891e
MP
6872014-09-24 Marek Polacek <polacek@redhat.com>
688
689 PR c/61405
690 PR c/53874
691 * c-parser.c: Don't define CPP_KEYWORD.
692 (c_parser_switch_statement): Pass original type to c_finish_case.
693 * c-tree.h (c_finish_case): Update declaration.
694 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
695 conditionally to c_do_switch_warnings.
696
8d95fe25
MP
6972014-09-03 Marek Polacek <polacek@redhat.com>
698
699 PR c/62024
700 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
701 conversions.
702
9a771876
JJ
7032014-09-02 Jakub Jelinek <jakub@redhat.com>
704 Balaji V. Iyer <balaji.v.iyer@intel.com>
705 Igor Zamyatin <igor.zamyatin@intel.com>
706
707 * c-parser.c (c_parser_cilk_for): New function.
708 (c_parser_cilk_grainsize): Likewise.
709 (c_get_temp_regvar): Likewise.
710 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
711 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
712 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
713 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
714 case.
715
b7679d96
CG
7162014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
717
718 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
719 with using HOST_WIDE_INT without truncation to 'int'
720
59ea0364
MP
7212014-08-22 Marek Polacek <polacek@redhat.com>
722
723 PR c++/62199
724 * c-typeck.c (parser_build_binary_op): Adjust call to
725 warn_logical_not_parentheses.
726
671a475e
IZ
7272014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
728
729 PR other/62008
730 * c-parser.c (c_parser_array_notation): Check for correct
731 type of an array added.
732
04159acf
MP
7332014-08-19 Marek Polacek <polacek@redhat.com>
734
735 PR c++/62153
736 * c-typeck.c (build_binary_op): If either operand of a comparison
737 is a boolean expression, call maybe_warn_bool_compare.
738
c77935ee
PP
7392014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
740
741 PR c/45584
742 * c-typeck.c (build_c_cast): Do a conversion even when the
743 TYPE_MAIN_VARIANTs are the same.
744
35aff4fb
MP
7452014-08-19 Marek Polacek <polacek@redhat.com>
746
747 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
748 pedwarn_c99 instead of pedwarn.
749 (grokfield): Likewise.
750 (warn_defaults_to): New function.
751 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
752 Unconditionally call pedwarn_c99 instead of pedwarn.
753 (start_function): Call warn_defaults_to instead of pedwarn_c99.
754 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
755 check flag_isoc11 before.
756 * c-errors.c (pedwarn_c99): Change the return type to bool.
757 Handle -Wc99-c11-compat.
758 * c-parser.c (disable_extension_diagnostics): Handle
759 warn_c99_c11_compat.
760 (restore_extension_diagnostics): Likewise.
761 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
762 instead of pedwarn, don't check flag_isoc11 before.
763 (c_parser_declspecs): Likewise.
764 (c_parser_alignas_specifier): Likewise.
765 (c_parser_alignof_expression): Likewise.
766 (c_parser_generic_selection): Likewise.
767 * c-tree.h (pedwarn_c99): Update declaration.
768 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
769 of pedwarn_c99.
770
177cce46
MP
7712014-08-19 Marek Polacek <polacek@redhat.com>
772
773 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
774 to pedwarn_c90.
775 * c-errors.c: Include "opts.h".
776 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
777 * c-parser.c (disable_extension_diagnostics): Handle negative value
778 of warn_c90_c99_compat, too.
779 (restore_extension_diagnostics): Likewise.
780 (c_parser_compound_statement_nostart): Pass
781 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
782
6dc99c33
MP
7832014-08-12 Marek Polacek <polacek@redhat.com>
784
785 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
786 Add pedwarn.
787 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
788 Likewise.
789 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
790
f3bede71
MP
7912014-08-10 Marek Polacek <polacek@redhat.com>
792
793 PR c/51849
794 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
795 Call pedwarn_c90 instead of pedwarn.
796 (check_bitfield_type_and_width): Likewise.
797 (declspecs_add_qual): Likewise.
798 (declspecs_add_type): Likewise.
799 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
800 Adjust to only call pedwarn_c90.
801 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
802 pedwarn_c90 instead of pedwarn.
803 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
804 * c-parser.c (disable_extension_diagnostics): Handle
805 warn_c90_c99_compat.
806 (restore_extension_diagnostics): Likewise.
807 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
808 pedwarn_c90 instead of pedwarn.
809 (c_parser_initelt): Likewise.
810 (c_parser_postfix_expression): Likewise.
811 (c_parser_postfix_expression_after_paren_type): Likewise.
812 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
813 * c-tree.h: Fix formatting.
814 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
815 pedwarn_c90 instead of pedwarn.
816
9f25a338
TS
8172014-08-07 Trevor Saunders <tsaunders@mozilla.com>
818
819 * c-typeck.c: Remove include of pointer-set.h.
820
044331a8
MP
8212014-08-07 Marek Polacek <polacek@redhat.com>
822
823 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
824
b787e7a2
TS
8252014-08-02 Trevor Saunders <tsaunders@mozilla.com>
826
827 * c-typeck.c: Use hash_map instead of pointer_map.
828
6e2830c3
TS
8292014-08-02 Trevor Saunders <tsaunders@mozilla.com>
830
831 * c-decl.c: Use hash_set instead of pointer_set.
832
a7ee52fb
IZ
8332014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
834
835 PR middle-end/61455
836 * c-array-notation.c (expand_array_notations): Handling
837 of DECL_EXPR added.
838
b4dfdc11
MG
8392014-07-31 Marc Glisse <marc.glisse@inria.fr>
840
841 PR c++/60517
842 * c-typeck.c (c_finish_return): Return 0 instead of the address of
843 a local variable.
844
976d5a22
TT
8452014-07-30 Tom Tromey <tromey@redhat.com>
846
847 * c-typeck.c (struct constructor_stack) <designator_depth>: New
848 field.
849 (really_start_incremental_init, push_init_level): Initialize
850 designator_depth.
851 (pop_init_level): Set global designator_depth.
852 (process_init_element): Check for designated_init attribute.
853
30281de2
MP
8542014-07-20 Marek Polacek <polacek@redhat.com>
855
856 PR c/61852
857 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
858 (implicitly_declare): Pass location to implicit_decl_warning.
859
b108f48f
JJ
8602014-07-14 Jakub Jelinek <jakub@redhat.com>
861
862 PR middle-end/61294
863 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
864 If non-NULL, call c_parser_check_literal_zero.
865 (c_parser_check_literal_zero): New function.
866 (c_parser_postfix_expression_after_primary): Adjust
867 c_parser_expr_list caller, handle -Wmemset-transposed-args.
868
773ec47f
MP
8692014-07-06 Marek Polacek <polacek@redhat.com>
870
871 PR c/6940
872 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
873 * c-tree.h (C_ARRAY_PARAMETER): Define.
874 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
875 function parameter.
876
22e1cf1c
JH
8772014-07-02 Jan Hubicka <hubicka@ucw.cz>
878 Chen Gang <gang.chen.5i5j@gmail.com>
879
880 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
881 releasing symbol.
882
52ec0ea3
MP
8832014-07-01 Marek Polacek <polacek@redhat.com>
884
885 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
886 instead of 0 to WARN_FOR_ASSIGNMENT.
887
d5c3d343
MP
8882014-07-01 Marek Polacek <polacek@redhat.com>
889
890 PR c/58286
891 * c-typeck.c (convert_for_assignment): Pass
892 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
893
6a7253a4
MP
8942014-06-30 Marek Polacek <polacek@redhat.com>
895
896 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
897 has no_sanitize_undefined attribute.
898
5e88a8f4
IZ
8992014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
900
901 PR middle-end/57541
902 * c-array-notation.c (fix_builtin_array_notation_fn):
903 Check for 0 arguments in builtin call. Check that bultin argument is
904 correct.
905 * c-parser.c (c_parser_array_notation): Check for incorrect initial
906 index.
907
9698b078
SH
9082014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
909
910 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
911 qualifiers in __auto_type for atomic types.
912 (c_parser_typeof_specifier): Discard all type qualifiers in
913 __typeof__ for atomic types.
914
6e07c515
MP
9152014-06-25 Marek Polacek <polacek@redhat.com>
916
917 PR c/61162
918 * c-parser.c (c_parser_statement_after_labels): Pass the location of
919 the return expression to c_finish_return.
920
da6f124d
JJ
9212014-06-25 Jakub Jelinek <jakub@redhat.com>
922
923 * c-typeck.c (c_finish_omp_clauses): Make sure
924 OMP_CLAUSE_LINEAR_STEP has correct type.
925
c203e8a7
TS
9262014-06-24 Trevor Saunders <tsaunders@mozilla.com>
927
928 * c-decl.c: Adjust.
929
56ad0e38
JJ
9302014-06-24 Jakub Jelinek <jakub@redhat.com>
931
932 * c-parser.c (c_parser_omp_for_loop): For
933 #pragma omp parallel for simd move lastprivate clause from parallel
934 to for rather than simd.
935
47c2554f
MP
9362014-06-23 Marek Polacek <polacek@redhat.com>
937
938 * c-typeck.c (parser_build_binary_op): Don't call
939 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
940
56363ffd
JH
9412014-06-15 Jan Hubicka <hubicka@ucw.cz>
942
943 * c-parser.c (c_parser_omp_threadprivate): Likewise.
944 * c-decl.c (merge_decls): Likewise.
945
d7ff7ae5
MP
9462014-06-09 Marek Polacek <polacek@redhat.com>
947
948 PR c/36446
949 * c-typeck.c (error_init): Call inform instead of error_at.
950 (pedwarn_init): Call inform instead of pedwarn.
951 (warning_init): Call inform instead of warning_at.
952
24d047a3
JH
9532014-06-07 Jan Hubicka <hubicka@ucw.cz>
954
955 * c-decl.c (merge_decls): Use set_decl_section_name.
956 (duplicate_decls): Remove node if it exists.
957
9bac5cbb
G
9582014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
959
960 PR c/53119
961 * c-typeck.c (push_init_level, process_init_element,
962 pop_init_level): Correct check for zero initialization, move
963 missing brace warning to respect zero initialization.
964
8ffcdea8
MP
9652014-06-05 Marek Polacek <polacek@redhat.com>
966
967 PR c/56724
968 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
969
742938c9
MP
9702014-06-05 Marek Polacek <polacek@redhat.com>
971
972 PR c/49706
973 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
974 on the left hand side operand of a comparison.
975
6447c55d
MP
9762014-06-05 Marek Polacek <polacek@redhat.com>
977
978 PR c/48062
979 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
980 Print note only if the warning was printed.
981
9dc7743c
IZ
9822014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
983
984 PR c/58942
985 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
986 with a pointer.
987
fedfecef
MP
9882014-06-03 Marek Polacek <polacek@redhat.com>
989
990 PR c/60439
991 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
992 c_start_case.
993 * c-tree.h (c_start_case): Update.
994 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
995 switch condition has boolean value.
996
9b2b7279
AM
9972014-06-02 Andrew MacLeod <amacleod@redhat.com>
998
999 * c-decl.c: Include builtins.h.
1000 * c-parser.c: Likewise.
1001
5c1bc275
MP
10022014-05-27 Marek Polacek <polacek@redhat.com>
1003
1004 PR c/56724
1005 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1006 error and warning calls to error_at and warning_at. Pass location of
1007 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1008 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1009 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1010
97563bc8
IZ
10112014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1012
1013 PR c/61191
1014 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1015 function parameters.
1016
aede2c10
JH
10172014-05-23 Jan Hubicka <hubicka@ucw.cz>
1018
1019 * c-decl.c (merge_decls): Preserve symtab node pointers.
1020 (duplicate_decls): Free new decl.
1021
edbba2ce
TS
10222014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1023
f3316c6d
TS
1024 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1025 initialization.
1026
edbba2ce
TS
1027 * c-parser.c (c_parser_omp_target): Return bool values.
1028
68c81f24
TS
10292014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1030
1031 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1032 num_teams_loc variable to num_thread_limit_loc.
1033
632f2871
RS
10342014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1035
1036 * c-array-notation.c (expand_array_notations): Use void_node
1037 instead of void_zero_node.
1038
766090c2
TS
10392014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1040
1041 * c-decl.c (finish_struct): Adjust.
1042 (finish_enum): Likewise.
1043 (bind): Adjust.
1044 (record_inline_static): Likewise.
1045 (push_scope): Likewise.
1046 (make_label): Likewise.
1047 (lookup_label_for_goto): Likewise.
1048 (finish_struct): Likewise.
1049 (finish_enum): Likewise.
1050 (store_parm_decls): Likewise.
1051 (c_push_function_context): Likewise.
1052 * c-lang.h: Remove usage of variable_size gty attribute.
1053 * c-parser.c (c_parse_init): Adjust.
1054 (c_parse_file): Likewise.
1055
2b107f6b
MP
10562014-05-13 Marek Polacek <polacek@redhat.com>
1057
1058 PR c/61162
1059 * c-typeck.c (convert_for_assignment): Pass location to
1060 WARN_FOR_ASSIGNMENT instead of input_location.
1061
d033409e
MP
10622014-05-10 Marek Polacek <polacek@redhat.com>
1063
1064 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1065 maybe_warn_string_init.
1066 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1067 maybe_warn_string_init.
1068 * c-tree.h (maybe_warn_string_init): Update declaration.
1069 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1070 Call pedwarn_init with loc instead of with input_location.
1071 (digest_init): Pass init_loc to maybe_warn_string_init.
1072 (pop_init_level): Call pedwarn_init with loc instead of with
1073 input_location.
1074 (set_init_index): Likewise.
1075 (process_init_element): Likewise.
1076
ea58ef42
MP
10772014-05-09 Marek Polacek <polacek@redhat.com>
1078
1079 PR c/61096
1080 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1081 (c_parser_initelt): Pass location to set_init_label. Pass array index
1082 location to set_init_index.
1083 * c-tree.h (push_init_level): Update declaration.
1084 (pop_init_level): Likewise.
1085 (set_init_index): Likewise.
1086 (set_init_label): Likewise.
1087 * c-typeck.c (error_init): Add location parameter. Call error_at
1088 instead of error.
1089 (digest_init): Pass init_loc to error_init.
1090 (really_start_incremental_init):
1091 (push_init_level): Add location parameter. Pass loc to pop_init_level
1092 and error_init.
1093 (pop_init_level): Likewise.
1094 (set_designator): Add location parameter. Pass loc to pop_init_level,
1095 push_init_level, and error_init.
1096 (set_init_index): Add location parameter. Pass loc to error_init and
1097 set_designator.
1098 (set_init_label): Likewise.
1099 (output_init_element): Pass loc to error_init.
1100 (process_init_element): Pass loc to error_init, pop_init_level,
1101 pedwarn_init, and push_init_level.
1102
661a0813
MP
11032014-05-09 Marek Polacek <polacek@redhat.com>
1104
1105 PR c/50459
1106 * c-parser.c (c_parser_attributes): Parse the arguments as an
1107 expression-list if the attribute takes identifier.
1108
2793eeab
MP
11092014-05-08 Marek Polacek <polacek@redhat.com>
1110
1111 PR c/61053
1112 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1113 TYPE_ALIGN_UNIT.
1114
f827930a
MP
11152014-05-08 Marek Polacek <polacek@redhat.com>
1116
1117 PR c/61077
1118 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1119 of main.
1120
1d60af08
KZ
11212014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1122 Mike Stump <mikestump@comcast.net>
1123 Richard Sandiford <rdsandiford@googlemail.com>
1124
1125 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1126 (finish_enum): Use wide-int interfaces.
1127 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1128 * c-typeck.c (build_c_cast): Likewise.
1129 (set_nonincremental_init_from_string): Likewise.
1130 (c_tree_equal): Likewise.
1131
a0e24419
MP
11322014-05-02 Marek Polacek <polacek@redhat.com>
1133
1134 PR c/25801
1135 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1136 Return size_one_node when the type is not complete.
1137 (pointer_diff): Remove comment.
1138 (build_unary_op): Improve error messages.
1139
19fc9faa
MP
11402014-05-02 Marek Polacek <polacek@redhat.com>
1141
1142 * c-typeck.c (c_finish_return): Separate warning_at calls.
1143
63bc4e87
MP
11442014-05-02 Marek Polacek <polacek@redhat.com>
1145
1146 * c-tree.h (error_init): Remove declaration.
1147 (pedwarn_init): Likewise.
1148 * c-typeck.c (error_init): Make static and move above.
1149 (pedwarn_init): Likewise.
1150 (warning_init): Move above.
1151 (maybe_warn_string_init): Likewise.
1152
4bd2511b
JL
11532014-05-01 Jeff Law <law@redhat.com>
1154
1155 Revert:
1156
1157 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1158 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1159 avoid goto.
1160
6a358dcb
MP
11612014-05-02 Marek Polacek <polacek@redhat.com>
1162
1163 PR c/60784
1164 * c-typeck.c (push_init_level): Set constructor_designated to
1165 p->designated for structures.
1166
ae5ebda4
MP
11672014-05-01 Marek Polacek <polacek@redhat.com>
1168
1169 PR c/60915
1170 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1171 function-definition has an attribute after the declarator.
1172
96b40f8d
MP
11732014-05-01 Marek Polacek <polacek@redhat.com>
1174
1175 PR c/60257
1176 * c-typeck.c (warning_init): Add location_t parameter. Call
1177 warning_at instead of warning.
1178 (push_init_level): Pass input_location to warning_init.
1179 (add_pending_init): Add location_t parameter. Pass loc to
1180 warning_init.
1181 (set_nonincremental_init): Pass input_location to add_pending_init.
1182 (set_nonincremental_init_from_string): Likewise.
1183 (output_init_element): Pass loc to warning_init and to
1184 add_pending_init.
1185
32e00768
MP
11862014-05-01 Marek Polacek <polacek@redhat.com>
1187
1188 PR c/43395
1189 * c-typeck.c (c_finish_return): Distinguish between label and variable
1190 when warning about returning local address.
1191
c9379ce2
MP
11922014-05-01 Marek Polacek <polacek@redhat.com>
1193
1194 PR c/29467
1195 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1196 in C89 mode.
1197
d00887e8
MP
11982014-05-01 Marek Polacek <polacek@redhat.com>
1199
1200 PR c/43245
1201 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1202 instead of 0 to WARN_FOR_QUALIFIERS.
1203
5436fa2e
MP
12042014-05-01 Marek Polacek <polacek@redhat.com>
1205
1206 PR c/56989
1207 * c-typeck.c (default_conversion): Use better location for
1208 error call.
1209
f8ed5150
MP
12102014-04-30 Marek Polacek <polacek@redhat.com>
1211
1212 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1213 also when SANITIZE_FLOAT_DIVIDE is on.
1214
8337d1db
MP
12152014-04-30 Marek Polacek <polacek@redhat.com>
1216
1217 PR c/60139
1218 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1219 and pedwarn_init. Use loc insted of input_location.
1220
c4bdc42f
MP
12212014-04-30 Marek Polacek <polacek@redhat.com>
1222
1223 PR c/60351
1224 * c-typeck.c (build_binary_op): Use location when warning about
1225 shift count.
1226
45484dcf
MP
12272014-04-25 Marek Polacek <polacek@redhat.com>
1228
1229 PR c/18079
1230 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1231 always_inline/noinline and hot/cold attributes.
1232
34cf811f
MP
12332014-04-25 Marek Polacek <polacek@redhat.com>
1234
1235 PR c/60114
1236 * c-parser.c (c_parser_initelt): Pass input_location to
1237 process_init_element.
1238 (c_parser_initval): Pass loc to process_init_element.
1239 * c-tree.h (process_init_element): Adjust declaration.
1240 * c-typeck.c (push_init_level): Pass input_location to
1241 process_init_element.
1242 (pop_init_level): Likewise.
1243 (set_designator): Likewise.
1244 (output_init_element): Add location_t parameter. Pass loc to
1245 digest_init.
1246 (output_pending_init_elements): Pass input_location to
1247 output_init_element.
1248 (process_init_element): Add location_t parameter. Pass loc to
1249 output_init_element.
1250
42056eac
JJ
12512014-04-24 Jakub Jelinek <jakub@redhat.com>
1252
1253 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1254 atomic-clause, allow comma in between atomic-clause and
1255 seq_cst.
1256
e162a134
JJ
12572014-04-22 Jakub Jelinek <jakub@redhat.com>
1258
1259 PR c/59073
1260 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1261 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1262
2f6babac
IZ
12632014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1264
1265 PR middle-end/60469
1266 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1267 create_tmp_var instead build_decl for creating temps.
1268 (build_array_notation_expr): Likewise.
1269 (fix_conditional_array_notations_1): Likewise.
1270 (fix_array_notation_expr): Likewise.
1271 (fix_array_notation_call_expr): Likewise.
1272
8edbfaa6
JJ
12732014-03-28 Jakub Jelinek <jakub@redhat.com>
1274
1275 PR c++/60689
1276 * c-tree.h (c_build_function_call_vec): New prototype.
1277 * c-typeck.c (build_function_call_vec): Don't call
1278 resolve_overloaded_builtin here.
1279 (c_build_function_call_vec): New wrapper function around
1280 build_function_call_vec. Call resolve_overloaded_builtin here.
1281 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1282 Call c_build_function_call_vec instead of build_function_call_vec.
1283 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1284 * c-decl.c (finish_decl): Likewise.
1285
7485aeea
MLI
12862014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1287
1288 PR c/55383
1289 * c-typeck.c: Use correct format string in cast-qual warning
1290
b17a8b07
TS
12912014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1292
1293 * c-decl.c (c_decl_attributes): Use
1294 lang_hooks.types.omp_mappable_type.
1295 * c-typeck.c (c_finish_omp_clauses): Likewise.
1296
3af9c5e9
MP
12972014-03-06 Marek Polacek <polacek@redhat.com>
1298
1299 PR c/60197
1300 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1301 of checking tree code.
1302
1c9f5f33
PK
13032014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1304
1305 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1306 (c_parser_parameter_declaration): Likewise.
1307
cc28fc7f
MP
13082014-02-19 Marek Polacek <polacek@redhat.com>
1309
1310 PR c/60195
1311 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1312 Call mark_exp_read on exp.value.
1313 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1314 TREE_ADDRESSABLE on old instead of val.
1315 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1316
b581c05c
PK
13172014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1318
1319 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1320 C_EXPR_APPEND by vec_safe_push.
1321 * c-tree.h (C_EXPR_APPEND): Remove.
1322
81e5eca8
MP
13232014-01-31 Marek Polacek <polacek@redhat.com>
1324
1325 PR c/59963
1326 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1327 build_function_call_vec.
1328 (build_function_call): Likewise.
1329 (build_atomic_assign): Likewise.
1330 (build_function_call_vec): Add arg_loc parameter. Use it.
1331 (convert_arguments): Likewise.
1332 (convert_for_assignment): Rename rhs_loc to expr_loc.
1333 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1334 (c_parser_objc_keywordexpr): Likewise.
1335 (c_parser_postfix_expression_after_primary): Call
1336 build_function_call_vec with expr_loc rather than op_loc.
1337 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1338 build_function_call_vec.
1339 (c_parser_expr_list): Add locations parameter. Fill it with locations
1340 of function arguments.
1341 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1342
68fca595
MP
13432014-01-30 Marek Polacek <polacek@redhat.com>
1344
1345 PR c/59940
1346 * c-typeck.c (build_function_call_vec): Use loc parameter.
1347 (convert_arguments): Add location parameter. Use it.
1348 (ep_convert_and_check): Likewise.
1349 (build_atomic_assign): Adjust convert_for_assignment call.
1350 (build_modify_expr): Likewise.
1351 (digest_init): Likewise.
1352 (c_finish_return): Likewise.
1353 (build_conditional_expr): Adjust ep_convert_and_check calls.
1354 (convert_for_assignment): Add rhs_loc parameter. Use it.
1355 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1356 calls.
1357
fa337f3a
RB
13582014-01-30 Richard Biener <rguenther@suse.de>
1359
1360 PR c/59905
1361 * c-typeck.c (build_function_call_vec): Do not replace calls
1362 to a function via an incompatible type with a runtime abort.
1363
b72271b9
BI
13642014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1365
1366 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1367 flag_enable_cilkplus with flag_cilkplus.
1368 (c_parser_direct_declarator_inner): Likewise.
1369 (c_parser_attribute_any_word): Likewise.
1370 (c_parser_attributes): Likewise.
1371 (c_parser_compound_statement): Likewise.
1372 (c_parser_statement_after_labels): Likewise.
1373 (c_parser_if_statement): Likewise.
1374 (c_parser_switch_statement): Likewise.
1375 (c_parser_do_statement): Likewise.
1376 (c_parser_for_statement): Likewise.
1377 (c_parser_unary_expression): Likewise.
1378 (c_parser_postfix_expression): Likewise.
1379 (c_parser_postfix_expression_after_primary): Likewise.
1380 (c_parser_postfix_expression_after_primary): Likewise.
1381 (c_parser_omp_clause_name): Likewise.
1382 (c_finish_omp_declare_simd): Likewise.
1383 (c_parser_cilk_verify_simd): Likewise.
1384 * c-typeck.c (build_array_ref): Likewise.
1385 (build_function_call_vec): Likewise.
1386 (convert_arguments): Likewise.
1387 (build_compound_expr): Likewise.
1388 (c_finish_return): Likewise.
1389 (c_finish_if_stmt): Likewise.
1390 (c_finish_loop): Likewise.
1391 (build_binary_op): Likewise.
1392
393e8e8b
MP
13932014-01-23 Marek Polacek <polacek@redhat.com>
1394
1395 PR c/59846
1396 * c-typeck.c (parser_build_binary_op): Use location instead of
1397 input_location.
1398 (build_binary_op): Pass location to shorten_compare.
1399
f04dda30
MP
14002014-01-23 Marek Polacek <polacek@redhat.com>
1401
1402 PR c/58346
1403 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1404 an empty aggregate.
1405
789eadcd
MP
14062014-01-23 Marek Polacek <polacek@redhat.com>
1407
1408 PR c/59871
1409 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1410 of a comma expression.
1411 (emit_side_effect_warnings): Likewise.
1412
40f14e9f
BI
14132014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1414
1415 PR c/59825
1416 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1417 function to use walk_tree and moved a lot of its functionality to
1418 expand_array_notations.
1419 (expand_array_notations): New function.
1420
74558dd9
BI
14212014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1422
1423 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1424 attribute an attribute without value.
1425
652fea39
JJ
14262014-01-23 Jakub Jelinek <jakub@redhat.com>
1427
1428 PR middle-end/58809
1429 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1430 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1431
f34f1c87
MP
14322014-01-22 Marek Polacek <polacek@redhat.com>
1433
1434 PR c/59891
1435 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1436 of remove_c_maybe_const_expr on op1 and op2.
1437
241f845a
JJ
14382014-01-15 Jakub Jelinek <jakub@redhat.com>
1439
1440 PR c/58943
1441 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1442 effects, preevaluate rhs using SAVE_EXPR first.
1443
9a74f20c
BI
14442014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1445
1446 PR c++/59631
1447 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1448 statements with if-elseif statements.
1449
96066ce1
MP
14502014-01-06 Marek Polacek <polacek@redhat.com>
1451
1452 PR c/57773
1453 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1454 defined bit-field types only in ISO C.
1455
23a5b65a
RS
14562014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1457
1458 Update copyright years
1459
f9030485
RS
14602014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1461
1462 * c-array-notation.c: Use the standard form for the copyright notice.
1463
41958c28
BI
14642013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1465
1466 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1467 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1468 field in parser is not empty. If not-empty, call the function
1469 c_parser_finish_omp_declare_simd.
1470 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1471 between SIMD-enabled functions and #pragma simd. Added new parameter.
1472 (c_parser_cilk_all_clauses): Modified the usage of the function
1473 c_parser_cilk_clause_vectorlength as mentioned above.
1474 (c_parser_cilk_simd_fn_vector_attrs): New function.
1475 (c_finish_cilk_simd_fn_tokens): Likewise.
1476 (is_cilkplus_vector_p): Likewise.
1477 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1478 "nomask," and "mask" strings in clause name.
1479 (c_parser_omp_all_clauses): Added 3 new case statements:
1480 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1481 PRAGMA_CILK_CLAUSE_NOMASK.
1482 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1483 check for vector attribute and if so call the function
1484 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1485 called the function c_finish_cilk_simd_fn_tokens.
1486 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1487 parser field is non-empty. If so, parse them as you would parse
1488 the omp declare simd pragma.
1489 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1490 Added a check when step is a parameter and flag it as error.
1491 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1492 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1493 pragma_omp_clause.
1494
cef0fd0e
TS
14952013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1496
1497 * c-parser.c (c_parser_omp_parallel): Fix description.
1498
12893402
BI
14992013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1500
1501 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1502 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1503 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1504 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1505
296674db
JM
15062013-12-04 Joseph Myers <joseph@codesourcery.com>
1507
1508 PR c/52023
1509 * c-parser.c (c_parser_alignas_specifier): Use
1510 c_sizeof_or_alignof_type instead of c_alignof.
1511 (c_parser_alignof_expression): Likewise, with min_alignof
1512 parameter depending on alignof spelling used.
1513
edd28054
MP
15142013-12-04 Marek Polacek <polacek@redhat.com>
1515
1516 PR c/54113
1517 * c-decl.c (start_function): Don't warn for missing prototype for
1518 inline functions.
1519
da0fc454
MP
15202013-12-03 Marek Polacek <polacek@redhat.com>
1521
1522 PR c/59351
1523 * c-decl.c (build_compound_literal): Allow compound literals with
1524 empty initial value.
1525
4c2ecab0
JM
15262013-12-02 Joseph Myers <joseph@codesourcery.com>
1527
1528 PR c/58235
1529 * c-typeck.c (build_modify_expr): Diagnose assignment to
1530 expression with array type.
1531
340baef7
JM
15322013-11-29 Joseph Myers <joseph@codesourcery.com>
1533
1534 PR c/42262
1535 * c-typeck.c (process_init_element): Do not treat a string as
1536 initializing a whole array when used with a designator for an
1537 individual element.
1538
6763b9f7
JM
15392013-11-29 Joseph Myers <joseph@codesourcery.com>
1540
1541 PR c/57574
1542 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1543 an inline function following a static declaration.
1544
e7bd1de1
JJ
15452013-11-28 Jakub Jelinek <jakub@redhat.com>
1546
1547 PR c/59310
1548 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1549 to p_name before calling c_parser_omp_teams instead of after.
1550 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1551 argument. Remove unused p_name variable.
1552
0136f8f0
AH
15532013-11-27 Aldy Hernandez <aldyh@redhat.com>
1554 Jakub Jelinek <jakub@redhat.com>
1555
1556 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1557 external_scope is NULL.
1558
241b71bb
TV
15592013-11-27 Tom de Vries <tom@codesourcery.com>
1560 Marc Glisse <marc.glisse@inria.fr>
1561
1562 PR c++/59032
1563 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1564
2fb9a547
AM
15652013-11-22 Andrew MacLeod <amacleod@redhat.com>
1566
1567 * c-typeck.c: Add required include files from gimple.h.
1568
8400e75e
DM
15692013-11-22 David Malcolm <dmalcolm@redhat.com>
1570
1571 * c-decl.c (define_label, shadow_tag_warned)
1572 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1573 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1574 (declspecs_add_type): Remove use of in_system_header macro.
1575 * c-parser.c (c_parser_unary_expression): Likewise.
1576 * c-typeck.c (store_init_value, process_init_element)
1577 (c_start_case): Likewise.
1578
1579 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1580 macro.
1581
1582 * c-parser.c (c_parser_set_source_position_from_token): Remove
1583 reference to in_system_header from comment.
1584
386b1f1f
RS
15852013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1586
1587 * c-decl.c (grokdeclarator): Update comment to refer to
1588 tree_to_[su]hwi rather than tree_low_cst.
1589
ae7e9ddd
RS
15902013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1591
1592 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1593 tree_to_uhwi throughout.
1594
9439e9a1
RS
15952013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1596
1597 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1598 throughout.
1599
9541ffee
RS
16002013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1601
1602 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1603 throughout.
1604
c02065fc
AH
16052013-11-15 Aldy Hernandez <aldyh@redhat.com>
1606
1607 * c-parser.c (c_parser_cilk_simd): New.
1608 (c_parser_cilk_verify_simd): New.
1609 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1610 (c_parser_omp_for_loop): Add case for NE_EXPR.
1611 Set c_break_label for CILK_SIMD.
1612 (c_parser_cilk_clause_vectorlength): New.
1613 (c_parser_cilk_clause_linear): New.
1614 (c_parser_cilk_clause_name): New.
1615 (c_parser_cilk_all_clauses): New.
1616 * c-typeck.c (build_unary_op): Pass location argument to
1617 readonly_error.
1618 (build_modify_expr): Same.
1619 (build_asm_expr): Same.
1620 (c_finish_bc_stmt): Error on break/continue in loops.
1621
18f429e2
AM
16222013-11-14 Andrew MacLeod <amacleod@redhat.com>
1623
1624 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1625
d8a2d370
DN
16262013-11-14 Diego Novillo <dnovillo@google.com>
1627
1628 * c-decl.c: Include print-tree.h.
1629 Include stor-layout.h.
1630 Include varasm.h.
1631 Include attribs.h.
1632 Include stringpool.h.
1633 * c-lang.c: Include fold-const.h.
1634 * c-parser.c: Include stringpool.h.
1635 Include attribs.h.
1636 Include stor-layout.h.
1637 Include varasm.h.
1638 Include trans-mem.h.
1639 * c-typeck.c: Include stor-layout.h.
1640 Include trans-mem.h.
1641 Include varasm.h.
1642 Include stmt.h.
1643
38b7bc7f
JM
16442013-11-13 Joseph Myers <joseph@codesourcery.com>
1645
1646 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1647 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1648 __auto_type.
1649 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1650 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1651 RID_AUTO_TYPE.
1652 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1653 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1654 (c_parser_declarator, c_parser_direct_declarator_inner)
1655 (c_parser_parameter_declaration, c_parser_type_name): All callers
1656 changed.
1657 (c_parser_declaration_or_fndef): Handle declarations with type
1658 determined from the initializer.
1659
45b0be94
AM
16602013-11-12 Andrew MacLeod <amacleod@redhat.com>
1661
18f429e2 1662 * c-typeck.c: Include gimplify.h.
45b0be94 1663
582d9b50
JM
16642013-11-12 Joseph Myers <joseph@codesourcery.com>
1665
1666 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1667 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1668 comment.
1669 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1670 or _Thread_local as appropriate in diagnostics.
1671 (build_null_declspecs): Initialize ret->thread_gnu_p.
1672 (declspecs_add_scspec): Handle either __thread or _Thread_local
1673 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1674 pedantic. Do not disallow _Thread_local extern and _Thread_local
1675 static.
1676
267bac10
JM
16772013-11-07 Joseph Myers <joseph@codesourcery.com>
1678 Andrew MacLeod <amacleod@redhat.com>
1679
1680 * c-aux-info.c (gen_type): Handle atomic qualifier.
1681 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1682 qualifiers when compating types.
1683 (shadow_tag_warned): Handle atomic_p in declspecs.
1684 (quals_from_declspecs): Likewise.
1685 (start_decl): Use c_type_promotes_to when promoting argument
1686 types.
1687 (grokdeclarator): Handle _Atomic.
1688 (get_parm_info): Diagnose any qualifier on "void" as only
1689 parameter.
1690 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1691 comparing types. Use c_type_promotes_to when promoting argument
1692 types.
1693 (finish_function): Use c_type_promotes_to when promoting argument
1694 types.
1695 (build_null_declspecs): Handle atomic_p in declspecs.
1696 (declspecs_add_qual): Handle RID_ATOMIC.
1697 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1698 (c_token_starts_declspecs): Handle RID_ATOMIC.
1699 (c_parser_declspecs): Handle atomic type specifiers and
1700 qualifiers.
1701 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1702 from types of expressions with atomic type.
1703 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1704 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1705 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1706 (c_parser_statement_after_labels, c_parser_switch_statement)
1707 (c_parser_for_statement, c_parser_expr_no_commas)
1708 (c_parser_conditional_expression, c_parser_binary_expression)
1709 (c_parser_cast_expression, c_parser_unary_expression)
1710 (c_parser_postfix_expression)
1711 (c_parser_postfix_expression_after_primary, c_parser_expression):
1712 Use convert_lvalue_to_rvalue.
1713 (c_parser_expression_conv, c_parser_expr_list): Document
1714 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1715 (c_parser_objc_synchronized_statement): Use
1716 convert_lvalue_to_rvalue.
1717 (c_parser_objc_selector): Handle RID_ATOMIC.
1718 (c_parser_objc_receiver, c_parser_array_notation): Use
1719 convert_lvalue_to_rvalue.
1720 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1721 _Atomic (type-name).
1722 (struct c_declspecs): Add atomic_p field.
1723 (convert_lvalue_to_rvalue): Declare.
1724 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1725 corresponding atomic types.
1726 (qualify_type): Don't add _Atomic qualifiers from second argument.
1727 (comp_target_types): Do not allow _Atomic mismatches.
1728 (type_lists_compatible_p): Do not remove atomic qualifiers when
1729 comparing types.
1730 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1731 (build_atomic_assign): New functions.
1732 (build_unary_op): Use build_atomic_assign for atomic increment and
1733 decrement.
1734 (build_conditional_expr): Do not treat _Atomic void as a qualified
1735 version of void.
1736 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1737 (find_anonymous_field_with_type, convert_to_anonymous_field)
1738 (convert_for_assignment): Do not remove atomic qualifiers when
1739 comparing types.
1740 (digest_init): Do not accept initialization of arrays of atomic
1741 elements by string constants.
1742 (build_asm_expr): Use convert_lvalue_to_rvalue.
1743 (build_binary_op): Do not treat _Atomic void as a qualified
1744 version of void.
1745
0c249d4b
DD
17462013-11-06 DJ Delorie <dj@redhat.com>
1747
1748 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1749 both explicit and builtin, print the location of the explicit one.
1750
6d7f7e0a
TB
17512013-11-05 Tobias Burnus <burnus@net-b.de>
1752
1753 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1754 c_parser_omp_distribute, c_parser_omp_teams,
1755 c_parser_omp_target, c_parser_omp_declare): Handle
1756 -fopenmp-simd.
1757
b906f4ca
MP
17582013-11-03 Marek Polacek <polacek@redhat.com>
1759
1760 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1761
ee1d5a02
JJ
17622013-11-01 Jakub Jelinek <jakub@redhat.com>
1763
1764 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1765 check_dup_generic at the end, unless remove is true.
1766 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1767 remove = true;.
1768 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1769
5a9785fb
JJ
17702013-10-31 Jakub Jelinek <jakub@redhat.com>
1771
1772 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1773 with decl that is not pointer nor array.
1774
939b37da
BI
17752013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1776
1777 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1778 a spawning function is found.
1779 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1780 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1781 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1782 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1783 case.
1784 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1785 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1786 expr.
1787 (c_finish_return): Added a check to reject _Cilk_spawn in return
1788 expression.
1789 (build_cilk_spawn): New function.
1790 (build_cilk_sync): Likewise.
1791 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1792
d4af74d4
TB
17932013-10-27 Tobias Burnus <burnus@net-b.de>
1794
1795 PR other/33426
1796 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1797 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1798 (c_parser_statement_after_labels): Update calls.
1799
d73749df 18002013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1801
1802 PR other/33426
1803 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1804 Handle PRAGMA_IVDEP.
1805 (c_parser_statement_after_labels): Update call.
1806
f28aa681
MP
18072013-10-24 Marek Polacek <polacek@redhat.com>
1808
1809 * c-parser.c (c_parser_struct_declaration): Add a comment.
1810 (c_parser_declarator): Don't allow _Alignas here.
1811
0645c1a2
AM
18122013-10-17 Andrew MacLeod <amacleod@redhat.com>
1813
1814 * c-parser.c: Include omp-low.h.
1815 * c-typeck.c: Likewise.
1816
568a31f2
MP
18172013-10-17 Marek Polacek <polacek@redhat.com>
1818
1819 PR c/58267
1820 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1821 Document syntax of the array-declarator.
1822 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1823 are not permitted.
1824 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1825 (c_parser_struct_declaration): Likewise.
1826 (c_parser_declarator): Likewise.
1827 (c_parser_direct_declarator_inner): Likewise.
1828 (c_parser_parameter_declaration): Likewise.
1829 (c_parser_type_name): Likewise.
1830
acf0174b
JJ
18312013-10-11 Jakub Jelinek <jakub@redhat.com>
1832
1833 * c-lang.h (current_omp_declare_target_attribute): New extern
1834 decl.
1835 * c-parser.c: Include c-lang.h.
1836 (struct c_parser): Change tokens to c_token *.
1837 Add tokens_buf field. Change tokens_avail type to unsigned int.
1838 (c_parser_consume_token): If parser->tokens isn't
1839 &parser->tokens_buf[0], increment parser->tokens.
1840 (c_parser_consume_pragma): Likewise.
1841 (enum pragma_context): Add pragma_struct and pragma_param.
1842 (c_parser_external_declaration): Adjust
1843 c_parser_declaration_or_fndef caller.
1844 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1845 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1846 Adjust recursive call.
1847 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1848 of pragma_external.
1849 (c_parser_parameter_declaration): Use pragma_param instead of
1850 pragma_external.
1851 (c_parser_compound_statement_nostart, c_parser_label,
1852 c_parser_for_statement): Adjust
1853 c_parser_declaration_or_fndef callers.
1854 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1855 it through to c_parser_conditional_expression.
1856 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1857 pass it through to c_parser_binary_expression. Adjust recursive
1858 call.
1859 (c_parser_binary_expression): Remove prec argument, add
1860 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1861 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1862 binop matches it, use build2 instead of parser_build_binary_op.
1863 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1864 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1865 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1866 Handle pragma_struct and pragma_param the same as pragma_external.
1867 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1868 (c_parser_omp_variable_list): Parse array sections for
1869 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1870 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1871 (c_parser_omp_clause_reduction): Handle user defined reductions.
1872 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1873 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1874 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1875 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1876 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1877 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1878 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1879 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1880 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1881 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1882 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1883 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1884 (c_parser_omp_for_loop): Add CODE argument, pass it through
1885 to c_finish_omp_for. Change last argument to cclauses,
1886 and adjust uses to grab parallel clauses from the array of all
1887 the split clauses. Adjust c_parser_binary_expression,
1888 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1889 (omp_split_clauses): New function.
1890 (c_parser_omp_simd): New function.
1891 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1892 Allow the function to be called also when parsing combined constructs,
1893 and call c_parser_omp_simd when parsing for simd.
1894 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1895 #pragma omp section, require exactly one structured-block instead of
1896 sequence of statements.
1897 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1898 Allow the function to be called also when parsing combined constructs.
1899 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1900 Allow the function to be called also when parsing combined
1901 constructs.
1902 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1903 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1904 c_parser_omp_teams, c_parser_omp_target_data,
1905 c_parser_omp_target_update, c_parser_omp_target,
1906 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1907 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1908 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1909 (c_parser_omp_construct): Add p_name and mask vars. Handle
1910 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1911 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1912 and c_parser_omp_sections callers.
1913 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1914 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1915 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1916 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1917 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1918 OMP_CLAUSE_DEPEND.
1919 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1920 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1921 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1922 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1923 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1924 * c-typeck.c: Include tree-inline.h.
1925 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1926 handle_omp_array_sections_1, handle_omp_array_sections,
1927 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1928 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1929 user defined reductions.
1930 (c_tree_equal): New function.
1931 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1932 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1933 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1934 c_check_omp_declare_reduction_r): New prototypes.
1935 * c-decl.c (current_omp_declare_target_attribute): New variable.
1936 (c_decl_attributes): New function.
1937 (start_decl, start_function): Use it instead of decl_attributes.
1938 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1939 c_omp_reduction_decl, c_omp_reduction_lookup,
1940 c_check_omp_declare_reduction_r): New functions.
1941
0a6c2227
TT
19422013-09-25 Tom Tromey <tromey@redhat.com>
1943
1944 * Make-lang.in (c/gccspec.o): Remove.
1945 (CFLAGS-c/gccspec.o): New variable.
1946 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1947 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1948 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1949
f3bc55f0
TT
19502013-09-25 Tom Tromey <tromey@redhat.com>
1951
1952 * Make-lang.in (c/gccspec.o): Don't use subshell.
1953
a24d975c
MP
19542013-09-18 Marek Polacek <polacek@redhat.com>
1955
1956 PR sanitize/58443
1957 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1958 Remove unnecessary check.
1959
ce6923c5
MP
19602013-09-18 Marek Polacek <polacek@redhat.com>
1961
1962 PR sanitizer/58411
1963 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1964 no_sanitize_undefined attribute.
1965
a1e51df9
KT
19662013-09-13 Kai Tietz <ktietz@redhat.com>
1967
1968 PR target/57848
1969 * c-decl.c (c_builtin_function_ext_scope): Remove
1970 wrong assumption that it is never called on prexisting
1971 symbol.
1972
0af94e6f
JR
19732013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1974
1975 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1976
20059c8b
GDR
19772013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1978
1979 * c-objc-common.c (c_tree_printer): Tidy.
1980
de5a5fa1
MP
19812013-08-30 Marek Polacek <polacek@redhat.com>
1982
1983 * c-typeck.c (build_binary_op): Add division by zero and shift
1984 instrumentation.
1985
2531a1d9 19862013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1987 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1988
6e2bcc98 1989 PR c/35649
2531a1d9
JR
1990 * c-typeck.c (c_common_type): Prefer double_type_node over
1991 other REAL_TYPE types with the same precision.
1992 (convert_arguments): Likewise.
1993
025311c4
GDR
19942013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1995
1996 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1997 (c_initialize_diagnostics): Call a destructor for the early printer.
1998
da6ca2b5
GDR
19992013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2000
2001 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2002 printer initialization.
2003
318cda85 20042013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2005
318cda85
BI
2006 PR c/57490
2007 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2008 check for truth values.
2009 (expand_array_notation_exprs): Added truth values case. Removed an
2010 unwanted else. Added for-loop to walk through subtrees in default
2011 case.
2012
b066401f
GDR
20132013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2014
2015 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2016
fb48aadc
JM
20172013-07-23 Joseph Myers <joseph@codesourcery.com>
2018
2019 * c-parser.c (struct c_generic_association): Fix typo.
2020
433cc7b0
TT
20212013-07-23 Tom Tromey <tromey@redhat.com>
2022 Joseph Myers <joseph@codesourcery.com>
2023
2024 * c-parser.c (struct c_generic_association): New.
2025 (c_generic_association_d): New typedef.
2026 (c_parser_generic_selection): New function.
2027 (c_parser_postfix_expression): Handle RID_GENERIC.
2028
26d40c3d
JM
20292013-07-13 Jason Merrill <jason@redhat.com>
2030
2031 PR c++/57793
2032 * c-decl.c (finish_struct): Check for too-large class.
2033
ecdbd01a 20342013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2035
2036 PR c/57821
2037 * c-typeck.c (set_init_index): When folding, check for index overflow.
2038
1141ed3f
BI
20392013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2040
2041 * c-parser.c (c_parser_array_notation): Removed rejection of array
2042 notations in an array of function pointers.
2043
713b46fa
BI
20442013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2045
2046 * c-array-notation.c (make_triplet_val_inv): New function.
2047 (create_cmp_incr): Likewise.
2048 (create_array_refs): Likewise.
2049 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2050 Also modularized common parts between functions and called the function.
2051 (build_array_notation_expr): Likewise.
2052 (fix_conditional_array_notations_1): Likewise.
2053 (fix_array_notation_expr): Likewise.
2054 (fix_array_notation_call_expr): Likewise.
2055
92f20202
MP
20562013-06-18 Marek Polacek <polacek@redhat.com>
2057
2058 PR c/57630
2059 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2060
73a23b06
BI
20612013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2062
2063 * c-array-notation.c (build_array_notation_expr): Reject array notation
2064 mismatch between LHS and RHS even inside a call_expr. Also, removed
2065 a couple while statements that were dead code.
2066
00b8517d
BI
20672013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2068
2069 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2070 excessive precision expressions in function parameters. Also removed
2071 couple unwanted while statements.
2072
1509bdda
BI
20732013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2074
2075 * c-array-notation.c (expand_array_notation_exprs): Added
2076 ARRAY_NOTATION_REF case.
2077
d60f1706
BI
20782013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2079
2080 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2081 function to c-family/array-notation-common.c.
2082 (is_cilkplus_reduce_builtin): Likewise.
2083 (find_rank): Likewise.
2084 (extract_array_notation_exprs): Likewise.
2085 (replace_array_notations): Likewise.
2086 (find_inv_trees): Likewise.
2087 (replace_inv_trees): Likewise.
2088 (contains_array_notation_expr): Likewise.
2089 (find_correct_array_notation_type): Likewise.
2090 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2091 (struct inv_list): Moved this to c-family/array-notation-common.c.
2092 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2093
6d6efbb3
BI
20942013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2095
2096 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2097 reduction functions outside the for-loop. Added a check if the fundecl
2098 is non-NULL. Finally, removed an unwanted if-statement, and made the
2099 body unconditional.
2100
25c22937
BI
21012013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2102
2103 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2104 condition of the if-statement matches the rank of else-block and then-
2105 block when array notations are used.
2106 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2107 expression after the entire function body is parsed.
2108 (c_parser_expr_no_commas): Delayed creating array notation expressions
2109 to the end of function parsing.
2110 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2111 whole if-statement instead of just the condition.
2112 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2113
edd25645
BI
21142013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2115
2116 PR c/57474
2117 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2118 array to NULL_TREE if they are unused. Also added a check for the
2119 field to be NULL before its fields are used in future.
2120
065ce7f1
RO
21212013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2122
2123 PR bootstrap/57450
2124 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2125 (build_array_notation_expr): Likewise.
2126
36536d79
BI
21272013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2128
2129 * c-typeck.c (build_array_ref): Added a check to see if array's
2130 index is greater than one. If true, then emit an error.
2131 (build_function_call_vec): Exclude error reporting and checking
2132 for builtin array-notation functions.
2133 (convert_arguments): Likewise.
2134 (c_finish_return): Added a check for array notations as a return
2135 expression. If true, then emit an error.
2136 (c_finish_loop): Added a check for array notations in a loop
2137 condition. If true then emit an error.
2138 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2139 (build_binary_op): Added a check for array notation expr inside
2140 op1 and op0. If present, we call another function to find correct
2141 type.
2142 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2143 * c-parser.c (c_parser_compound_statement): Check if array
2144 notation code is used in tree, if so, then transform them into
2145 appropriate C code.
2146 (c_parser_expr_no_commas): Check if array notation is used in LHS
2147 or RHS, if so, then build array notation expression instead of
2148 regular modify.
2149 (c_parser_postfix_expression_after_primary): Added a check for
2150 colon(s) after square braces, if so then handle it like an array
2151 notation. Also, break up array notations in unary op if found.
2152 (c_parser_direct_declarator_inner): Added a check for array
2153 notation.
2154 (c_parser_compound_statement): Added a check for array notation in
2155 a stmt. If one is present, then expand array notation expr.
2156 (c_parser_if_statement): Likewise.
2157 (c_parser_switch_statement): Added a check for array notations in
2158 a switch statement's condition. If true, then output an error.
2159 (c_parser_while_statement): Similarly, but for a while.
2160 (c_parser_do_statement): Similarly, but for a do-while.
2161 (c_parser_for_statement): Similarly, but for a for-loop.
2162 (c_parser_unary_expression): Check if array notation is used in a
2163 pre-increment or pre-decrement expression. If true, then expand
2164 them.
2165 (c_parser_array_notation): New function.
2166 * c-array-notation.c: New file.
2167 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2168
cd192ccc
MS
21692013-05-23 Mike Stump <mikestump@comcast.net>
2170
2171 * c-typeck.c (convert_for_assignment): Handle references to memory
2172 spaces better.
2173
427b248d
JM
21742013-05-16 Jason Merrill <jason@redhat.com>
2175
2176 * Make-lang.in (cc1$(exeext)): Use link mutex.
2177
44d90fe1
PC
21782013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2179
2180 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2181 to simply use OPT_Wpointer_arith.
2182 (build_unary_op): Likewise.
2183
4e7d7b3d
JJ
21842013-04-03 Jakub Jelinek <jakub@redhat.com>
2185
2186 PR c/19449
2187 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2188 argument. If set, or it temporarily for parsing of the first
2189 argument into force_folding_builtin_constant_p.
2190 (c_parser_postfix_expression): Adjust callers.
2191
839b422f
RB
21922013-03-21 Richard Biener <rguenther@suse.de>
2193
2194 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2195 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2196
2ee028f1
MP
21972013-02-12 Marek Polacek <polacek@redhat.com>
2198
2199 PR c/44938
2200 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2201 origtypes to NULL.
2202
8824edff
JJ
22032013-01-24 Jakub Jelinek <jakub@redhat.com>
2204
2205 PR c/56078
2206 * c-typeck.c (set_nonincremental_init_from_string): If
2207 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2208 returned false.
2209 (process_init_element): Likewise.
2210
eadd3d0d
JJ
22112012-12-20 Jakub Jelinek <jakub@redhat.com>
2212
2213 PR c++/55619
2214 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2215 argument, don't call default_function_array_conversion
2216 nor c_fully_fold here.
2217 (c_parser_asm_statement): Adjust callers.
2218 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2219 and outputs here, and call default_function_array_conversion
2220 on inputs that don't need to be addressable.
2221
f8a93a2e
JJ
22222012-12-18 Jakub Jelinek <jakub@redhat.com>
2223
2224 PR c/39464
2225 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2226 warning require that both c_common_unsigned_type as well as
2227 c_common_signed_type is the same for both mvl and mvr types.
2228
9771b263
DN
22292012-11-16 Diego Novillo <dnovillo@google.com>
2230
2231 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2232
2233 * c-common.c: Use new vec API in vec.h.
2234 * c-common.h: Likewise.
2235 * c-gimplify.c: Likewise.
2236 * c-pragma.c: Likewise.
2237 * c-pretty-print.c: Likewise.
2238 * c-pretty-print.h: Likewise.
2239 * c-semantics.c: Likewise.
2240 * c-decl.c: Likewise.
2241 * c-parser.c: Likewise.
2242 * c-tree.h: Likewise.
2243 * c-typeck.c: Likewise.
2244
880661a4
JW
22452012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2246
2247 PR c++/54930
2248 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2249
077d1abe
MLI
22502012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2251
2252 PR c/53066
2253 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2254 shadows a function, unless the variable is a function or a
2255 pointer-to-function.
2256
3a785c97
JJ
22572012-10-12 Jakub Jelinek <jakub@redhat.com>
2258
2259 PR c/54381
2260 * c-parser.c (struct c_tree_loc_pair): Removed.
2261 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2262 add location_t * and tree * arguments, fill in array of 3
2263 sizeof_arg trees and corresponding locs.
2264 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2265 c_parser_expr_list callers.
2266 (c_parser_postfix_expression_after_primary): Likewise. Pass
2267 array of 3 sizeof_arg trees and locs (corresponding to first
2268 3 arguments) to sizeof_pointer_memaccess_warning.
2269
703c8606
LC
22702012-10-09 Lawrence Crowl <crowl@google.com>
2271
2272 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2273 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2274 hash table.
2275
5d9de0d0
PC
22762012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2277
2278 PR c++/54194
2279 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2280 call.
2281
a212e43f
MG
22822012-10-09 Marc Glisse <marc.glisse@inria.fr>
2283
2284 PR c++/54427
2285 * c-typeck.c: Include c-common.h.
2286 (enum stv_conv): Moved to c-common.h.
2287 (scalar_to_vector): Moved to c-common.c.
2288 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2289 * Make-lang.in: c-typeck.c depends on c-common.h.
2290
3b78de56
AC
22912012-10-04 Arnaud Charlet <charlet@adacore.com>
2292
2293 * c-decl.c (c_write_global_declarations): Fix handling of
2294 -fdump-ada-spec*.
2295
78c60e3d
SS
22962012-09-30 Sharad Singhai <singhai@google.com>
2297
2298 * c-decl.c (c_write_global_declarations): Use a different method
2299 to determine if the dump has ben initialized.
2300
9f33203d
JM
23012012-09-14 Joseph Myers <joseph@codesourcery.com>
2302
2303 PR c/54552
2304 * c-typeck.c (c_cast_expr): When casting to a type requiring
2305 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2306 c_fully_fold first.
2307
a27d595d
JM
23082012-09-14 Joseph Myers <joseph@codesourcery.com>
2309
2310 PR c/54103
2311 * c-typeck.c (build_unary_op): Pass original argument of
2312 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2313 any C_MAYBE_CONST_EXPR, if it has integer operands.
2314 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2315 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2316 to c_objc_common_truthvalue_conversion, then remove any
2317 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2318 c_objc_common_truthvalue_conversion not
2319 c_common_truthvalue_conversion.
2320 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2321 call note_integer_operands for arguments with integer operands
2322 that are not integer constants.
2323
9feb29df
JJ
23242012-09-13 Jakub Jelinek <jakub@redhat.com>
2325
2326 PR c/54559
2327 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2328 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2329
d409320c
JJ
23302012-08-31 Jakub Jelinek <jakub@redhat.com>
2331
2332 PR c/54428
2333 * c-convert.c (convert): Don't call fold_convert_loc if
2334 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2335 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2336 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2337
6265d07c
JJ
23382012-08-24 Jakub Jelinek <jakub@redhat.com>
2339
2340 PR c/54355
2341 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2342 for nested and empty_ok arguments in the call to
2343 c_parser_declaration_or_fndef.
2344
1a4049e7
JJ
23452012-08-17 Jakub Jelinek <jakub@redhat.com>
2346
2347 * c-tree.h (c_last_sizeof_arg): Declare.
2348 * c-parser.c (struct c_tree_loc_pair): New type.
2349 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2350 non-NULL.
2351 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2352 (c_parser_postfix_expression_after_primary): Likewise. Call
2353 sizeof_pointer_memaccess_warning if needed.
2354 (sizeof_ptr_memacc_comptypes): New function.
2355 * c-typeck.c (c_last_sizeof_arg): New global variable.
2356 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2357
0229aee9
UB
23582012-07-24 Uros Bizjak <ubizjak@gmail.com>
2359
2360 * c-lang.h (lang_decl): Add variable_size GTY option.
2361
7ee2468b
SB
23622012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2363
2364 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2365 * Make-lang.in: Fix dependencies.
2366
d4a10d0a
SB
23672012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2368
2369 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2370 and add language Makefile hooks.
2371 * config-lang.in: New file.
2372 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2373 add the required "normal" config-lang.in rules.
2374 * c-lang.h: Moved from gcc/ to here.
2375 * c-tree.h: Likewise.
2376 * c-objc-common.c: Likewise.
2377 * c-objc-common.h: Likewise.
2378 * c-typeck.c: Likewise.
2379 * c-convert.c: Likewise.
2380 * c-lang.c: Likewise.
2381 * c-aux-info.c: Likewise.
2382 * c-errors.c: Likewise.
2383 * gccspec.c: Likewise.
2384 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2385 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2386\f
5624e564 2387Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2388
2389Copying and distribution of this file, with or without modification,
2390are permitted in any medium without royalty provided the copyright
2391notice and this notice are preserved.